0

I should rename a file (web page) with parameters and redirect all (parameters generated) old pages to newer like:

page.php -> renamed -> newpage.php

Redirect

page.php?param1=1&param2=string -> Redirect 301 -> newpage.php?param1=1&param2=string 
page.php?param1=2&param2=string -> Redirect 301 -> newpage.php?param1=2&param2=string 
page.php?param1=3&param2=string -> Redirect 301 -> newpage.php?param1=3&param2=string 

... ...

What is the right .htaccess code ?

Thank you M.

anubhava
  • 761,203
  • 64
  • 569
  • 643
  • Maybe this question same with this problem, [try this answer][1] [1]: http://stackoverflow.com/questions/20658268/htaccess-301-redirect-for-url-with-parameter/20658952#20658952 – Sucipto Jun 30 '14 at 07:56

1 Answers1

0

You can just place this rule in your root .htaccess:

RedirectMatch 301 ^/page\.php$ /newpage.php
anubhava
  • 761,203
  • 64
  • 569
  • 643