Forum

Thread tagged as: Question, Runway, FoxyCart

Perch FoxyCart App - Rerouting to cleaner URL

Currently the URL is setup like this: /shop/product.php?s={productSlug}, but I want: /shop/{custom-field}/{productSlug}. Is there something I can do with Perch to easily accomplish this, without having to do manual things such as editing the .htaccess file or adding routes? I thought maybe there is something I can add in product.php to automatically route to a cleaner URL, and just need headed in the right direction. {custom-field} would either be a text field taken from the product page, or ideally one of the categories added to the product.

Like I said, just need headed in the right direction. A link to documentation or some ideas. Thanks!

brian bower

brian bower 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

The issue is that you need to tell the web server to route those URLs to product.php, so putting code in product.php isn't sufficient in itself.

If you're using Runway, then it should be simple to set up a route on your product page:

shop/[custom]/[slug:s]