I would like to redirect http://www.example.com/products.php?id=WIZ page to http://www.example.com/newpage.php?nwmd=WIZ
I tried many combination of this issue, but it's didn't work! :(
I would like to redirect http://www.example.com/products.php?id=WIZ page to http://www.example.com/newpage.php?nwmd=WIZ
I tried many combination of this issue, but it's didn't work! :(
This rule should work for you:
RewriteEngine on
RewriteCond %{QUERY_STRING} ^id=([^&]+) [NC]
RewriteRule ^products\.php$ /newpage.php?nwmd=%1 [R=302,L,NC]
Try out this.
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^(.*)$ http://example.com/products.php?id=WIZ$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^(.*)$ http://www.example.com/newpage.php?nwmd=WIZ/$1 [R=301,L]