I am attempting to pressure a classic URL to visit the brand new url and my code appears to possess no effect

RewriteCond %{QUERY_STRING}  ^index2\.php?page=shop\.product_details&\.tabs\.tpl&product=310&category=71&Itemid=2$

RewriteRule .*  /hunting/back-packs/multi-packs/black-2.5-pack.html [R=301,L]

my old url is

www.mywebsite.com/index2.php?page=shop.product_details&.tabs.tpl&product=310&category=71&Itemid=2 

and my brand new one is

www.mywebsite.com/hunting/back-packs/multi-packs/black-2.5-pack.html

My code doesn't break not doesn't work either

Thanks ahead of time

When I understand you would like redirect (301 Permanent Redirect) therefore the URL can change in browser. This works with this URL ONLY /index2.php?page=shop.product_details&.tabs.tpl&product=310&category=71&Itemid=2:

RewriteCond %{QUERY_STRING} =page=shop.product_details&.tabs.tpl&product=310&category=71&Itemid=2 [NC]
RewriteRule ^index2\.php$ http://www.mywebsite.com/hunting/back-packs/multi-packs/black-2.5-pack.html [R=301,L]

If you would like internal redirect (rewrite), then begin using these lines:

RewriteCond %{QUERY_STRING} =page=shop.product_details&.tabs.tpl&product=310&category=71&Itemid=2 [NC]
RewriteRule ^index2\.php$ /hunting/back-packs/multi-packs/black-2.5-pack.html [L]

Please Be Aware:

  1. You have to put wrinkles inside a proper order (order of rules matters) otherwise (if putting it in the finish) some another rule will rewrite it to another URL.
  2. This must be put into .htaccess file in website root folder. For just about any other location you may want to modify it a little.