If you are trying to redirect a dynamic URL follow the steps to do it.


RewriteCond %{QUERY_STRING} ^product_id=(.*)$
RewriteRule ^product_view\.php$ /products/%1? [R=301,L]



The above statements would do the following,

http://www.example.com/product_view.php?product_id=4

redirected to

http://www.example.com/products/4

Hope it helps someone.
cheers.

0 comments



Some Links (off programming)