301 redirect from URL with query string to new domain with different query string

You could use a rewrite rule with a query string match condition, such as:

RewriteEngine On
RewriteCond   %{REQUEST_URI}    ^/index.php$
RewriteCond   %{QUERY_STRING}   ^page=news&id=2366$
RewriteRule   ^(.*)$ http://www.example2.com/news.php?name=23546   [R=301,L]

Checkout this blog page for more information on how this works.

Leave a Comment