Page is a not externally linkable
hottrout - 3:59 pm on Feb 15, 2012 (gmt 0)
I left this for a few days due to other work requirements and came back to it with fresh eyes. Knowing that the URL that uses the ? and the = is always the same path, I constructed this code to try and more easily capture %3D and %3F codes from google and process them properly. Unfortunatly the code does not produce any output, it does not seem to catch the incomming link. Could you please check my concept and let me know if it is even possible?
The incoming links from google look like this:-
http://www.example.com/cars/index.php%3Ffolder%3dford
http://www.example.com/cars/index.php%3Ffolder%3dford/mustang
http://www.example.com/cars/index.php%3Ffolder%3dford/mustang/bigbore
they are created on the site and should actually look like this:-
http://www.example.com/cars/index.php?folder=ford
http://www.example.com/cars/index.php?folder=ford/mustang
http://www.example.com/cars/index.php?folder=ford/mustang/bigbore
The code I was working on looks like this:-
# Redirect to remove query string characters from folder
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\%3[fF]folder\%3[dD]([^\ ]+)\ HTTP/
RewriteRule ^/cars/index\.php$ http://www.example.com/cars/index.php?folder=%2 [R=301,L]