Have you tried removing other lines one by one and testing it? I think you'll need the .php on windows.php though, as that's the name of the original file, isn't it?
Also, I tend to use this to strip the .php from the filenames:
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php
You need to keep the .php in the right hand side of the rewrite.
.php
What result are you getting? An error or a 404 status?
Thanks Martin but unfortunately, that still doesn't resolve the issue.
Hi Drew,
I am getting a 404 error now.
Have you tried removing everything from your .htaccess and adding it back in bit by bit?
.htaccess
Hi drew,
Yes I have tried that with no success
Ok - how can I help?
Thanks for the help but I have now managed to sort it out.
What I did was this...
RewriteRule ^windows/([a-zA-Z0-9-/]+)$ /windows.php?s=$1 [L]
list.html template
<a href="<perch:content id="_page" type="hidden" replace=".php|/" /><perch:content id="slug" type="slug" />">
I will need to add a new .htaccess rule for every page that will be using the list/detail template but does exactly what I need it to do.
Thanks again
Great stuff! Glad you cracked it :)
Have you tried removing other lines one by one and testing it? I think you'll need the .php on windows.php though, as that's the name of the original file, isn't it?
Also, I tend to use this to strip the .php from the filenames:
You need to keep the
.php
in the right hand side of the rewrite.What result are you getting? An error or a 404 status?
Thanks Martin but unfortunately, that still doesn't resolve the issue.
Hi Drew,
I am getting a 404 error now.
Have you tried removing everything from your
.htaccess
and adding it back in bit by bit?Hi drew,
Yes I have tried that with no success
Ok - how can I help?
Thanks for the help but I have now managed to sort it out.
What I did was this...
.htaccess
list.html template
I will need to add a new .htaccess rule for every page that will be using the list/detail template but does exactly what I need it to do.
Thanks again
Great stuff! Glad you cracked it :)