Hi everyone at PHP builder forums,
I would like to 301 redirect some dynamically generated PHP pages. Placing the following code in my .htaccess file would normally work very well:
RewriteCond %{QUERY_STRING} [&]?id=goat[&]?
RewriteRule ^oldsite\.php$ http://www.mysite.com/newsite.php? [R=301,L]
However the problem I have is that I have changed the name of the variable on the new page (the variable's value remains the same however). For example, I want to redirect:
http://www.mysite.com/oldsite.php?id=goat TO
http://www.mysite.com/newsite.php?animal=goat
I can't do this with the above code as I can't change the variable name, only the name of the domain and page. Any ideas?
MANY, MANY thanks,
Leao