301多个网址参数重定向
问题描述:
我想任何格式301多个网址参数重定向
mydomain.com/?main_page=products_new
mydomain.com/?main_page=products_new&page=2
mydomain.com/?main_page=products_new&disp_order=2
重定向到该
mydomain.com/new-products
我有这样的工作只有第一个参数。我怎样才能忽略其余的并且匹配任何含有?main_page-products_new?
RewriteCond %{QUERY_STRING} ^main_page=products_new [NC]
RewriteRule ^(.*) /new-products? [L,R=301]
这是行不通的。我使用RedirectMatch为其他网站没有问题。 – user78955
如果您将^ main ...更改为^ .main,该怎么办? –
仍然不起作用。 – user78955