This is a method of redirecting a URL with a query to a URL without a query.

Asked 2 years ago, Updated 2 years ago, 50 views

Thank you for your help.

I'd like to know how to redirect the URL with the old site query to the URL without the new site query.

Old site: "http://www.example.jp/index.php?option=com_virtuemart&page=shop.browse&manufacturer_id=4&Itemid=62&limitstart=0&lang=ja "

New site: "http://www.example.jp/brand/nike "

Below is the configuration that I wrote halfway through.

RewriteCon"%{QUERY_STRING}"^option=com_virtualemart&page=shop.browse&manufacturer_id=4"[OR]
RewriteCon "%{QUERY_STRING}" ^option=com_virtualemart&page=shop.browse&manufacturer_id=4&Itemid=62" [OR]
RewriteCon "%{QUERY_STRING}" ^option=com_virtuemart&page=shop.browse&manufacturer_id=4&Itemid=62&limitstart=0" [OR]
RewriteCon"%{QUERY_STRING}"^option=com_virtualemart&page=shop.browse&manufacturer_id=4&Itemid=62&limitstart=0&lang=ja"[OR]
RewriteCon "%{QUERY_STRING}" ^option=com_virtuemart&page=shop.browse&manufacturer_id=4&Itemid=62&limitstart=0&lang=en" [OR]
RewriteRule Pattern http://www.example.jp/brand/nike [R=301,L]

"Orially, I was looking at the ""Apache Cookbook"" while setting it up, but I was having trouble setting the regular expression pattern in the RewriteRule."I don't know what to set up.

I look forward to your kind cooperation.

apache

2022-09-30 16:17

1 Answers

RewriteRule^.*$http://www.example.jp/brand/nike [R=301,L]
Wouldn't that be all right?


2022-09-30 16:17

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.