Im trying to make my site URLS ‘tidy’ and can’t figure out querystrings
example, I want:
services.php?service=3
to be
services/3
I have the appropriate code in my services page to get the item
$loc = explode("/",$HTTP_SERVER_VARS["REQUEST_URI"]);
$service = $loc[count($loc)-1];
and htaccess is set to do all the redirect work on .php files as well as
<FilesMatch "^services$">
ForceType application/x-httpd-php
</FilesMatch>
but "services/3" gets a 404 error.
Rewrite rules being used are:
RewriteCond %{REQUEST_URI} !(\.[^./]+)$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) /$1.php [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+\.)+php\ HTTP
RewriteRule ^(.+)\.php$ /$1 [R=301,L]
Why not use: