.htaccess - Redirect index.php with parameters to index.php to others parameters using htaccess -


i have shop has migrated version, , product catalog has changed. now, have table correspondence of product id , need create redirection htaccess this:

rewriterule ^index.php?id_product=3&controller=product$ index.php id_product=101064&controller=product [r=301,l] 

i know the old id 3 id 101064... doesn't work.

i tried:

rewriterule ^toto.php$ index.php?id_product=101064&controller=product [r=301,l] 

and works, why doesn't first code snippet work?

you have use %{query_string}.

put code in htaccess (which has in root folder)

rewriteengine on  rewritecond %{query_string} ^id_product=3&controller=product$ rewriterule ^index\.php$ /index.php?id_product=101064&controller=product [r=301,l] 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -