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.
Subscribe to:
Post Comments (Atom)
0 comments
Post a Comment