Answer the question
In order to leave comments, you need to log in
How to make a mass 301 redirect when changing the get/post variable name in the url?
How to make a mass 301 redirect when changing the name of the get/post variable in the url from the old to the new one. For example: addresses /page.php?id=x to /page.php?fid=x
Answer the question
In order to leave comments, you need to log in
# 301 --- http://site.ru/page.php?id=x => http://site.ru/page.php?fid=x
RewriteCond %{QUERY_STRING} (^|&)id\=(.+)($|&)
RewriteRule ^page\.php$ /page.php?fid=x [L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question