Hi There
I've been working on creating search engine friendly URLS from query strings. I have written some rules using mod_rewrite and the rules are working well and re-directing query string URL's to my new friendly URL's. However, I seem to have a problem when introducing the [R=301] flag.
This code gives me my Search Engine friendly URL in the address bar:
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteCond %{REQUEST_URI} ^/ranges/ RewriteRule ^([-a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)$ /index.php?page=show_range&range_id=$2 [QSA,L]
But after I enter the R=301 flag this code gives displays the full index string URL:
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteCond %{REQUEST_URI} ^/ranges/ RewriteRule ^([-a-zA-Z_0-9]+)/([a-zA-Z_0-9]+)$ /index.php?page=show_range&range_id=$2 [R=301,QSA,L]
I am told that R=301 should be implemented to let Google know that the page has moved. What is going wrong?