Forum
URL for single items not working correctly {slug} not working
I'm using Perch: 3.0.8, PHP. I have a list and detail page using categories. With the following .htaccess rules...
RewriteRule ^services/(.+?)/?$ detail.php?s=$1 [L,QSA,NC]
RewriteRule ^category/(.+?)/?$ category.php?cat=$1 [L,QSA,NC]
The website is working fine and creating URL's such as domain.com/category/services/private-client/
for a category and domain.com/services/trusts-gifts
for the details page.
However, the problem lies in the Control Panel > Region Options > View page URL, Perch creates.
You would think using /services/{slug}
in the "URL for single items" would be correct. But this creates the "View Page" link as domain.com/services/
. {slug} has disappeared and the page is not found.
Yet setting /services/{slug}
perfectly in a search.
Any idea's what the problem is? Or a bug?
First thing to do is to make sure Perch is up to date https://grabaperch.com/update/v3-0-11
Then check to see if you still have the problem. If so please post the Diagnostic Report when requesting support.
Yes you were right. The update fixed it.
That's always the first thing to try, typically we fix issues when we are told about them unless it is very complex/we don't have enough info to reproduce. If you are a few versions out of date then you don't have those fixes.