[Pro] htaccess re-write for Category URL's

Working on a site with Perch and Freeway

I have a Perch category URL like this…

http://mysite/category.php?cat=products/demolition/

And want to change them to something cleaner like…

http://mysite/products/demolition/

something like this would work…

RewriteEngine On
RewriteRule ^([^/]*)/$ /category.php?cat=$1 [L]

The parameter of cat=products/demolition/ being a URL is pushing the link down the tree after the URL change so the page cannot be found at that level as category.php it in the main directory. Or I think that’s what happening.

Are there any tips how this can be fixed. I’m having a blind moment.


freewaytalk mailing list
email@hidden
Update your subscriptions at:

David, there’s a link on the Slack list (Perch channel) explaining this.


freewaytalk mailing list
email@hidden
Update your subscriptions at:

Probably is, if I could find it :frowning:


David Owen

On 23 May 2016, at 15:24, Todd email@hidden wrote:

David, there’s a link on the Slack list (Perch channel) explaining this.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
Information for existing FreewayTalk / Groups.io users - Site Feedback - Softpress Talk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Strange, I’m looking at it right now. Did you join the Perch channel?


freewaytalk mailing list
email@hidden
Update your subscriptions at:

This isn’t just a Perch issue. The link you gave was for fixing the blog posts. Different.

I’m referring to Perch Categories where the query is not a simple text string simple. This contains “/“ in the string meaning the rewrite is pointing to another directory that does not exist unless the re-write needs to replace the “/“.

I’m probably starting to answer my own question here. So I’m probably looking for a re-write that will replace the “/"

David Owen

On 23 May 2016, at 15:41, Todd email@hidden wrote:

Strange, I’m looking at it right now. Did you join the Perch channel?

Simple URL Rewriting - Perch CMS documentation


freewaytalk mailing list
email@hidden
Update your subscriptions at:
Information for existing FreewayTalk / Groups.io users - Site Feedback - Softpress Talk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options