.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

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -