www.example.com/location?loc=london in to
www.example.com/site/london
I have googled this and looked on this forum, but everything I've seen and tried seems to fail.
I understand that I need to add a rewrite rule in the .htaccess file, after the common exploits and before the SEF. But whatever I do it keeps coming up with a 404 error. (I use caching, but turn this off when making changes to the file)
This is the latest version I have tried to no avail. Please can someone help me before insanity sets in
Thanks for any help you can provide.
Code: Select all
Options +FollowSymLinks
RewriteEngine on
## Check for https
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,NC]
## Rewrite the location url
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^site/(\d+)*$ ./loc?l=$1[L]