2016-05-23 101 views
0

我需要从http://www.mysite.ru/news/?PAGEN_1=1重定向页面添加到http://www.mysite.ru/news/,所以我在.htaccess文件中加入代码如下与重定向的URL查询参数

RewriteCond %{QUERY_STRING} ^PAGEN_1=1 [NC] 
RewriteRule ^news/$ http://www.mysite.ru/news/ [R=301,L] 

,但我得到的错误“ERR_TOO_MANY_REDIRECTS”。怎么了,怎么解决?

+0

已经要求参考http://stackoverflow.com/questions/10135702/301-redirect-from-url-with-query-string-to-new-domain-with-不同的查询,〜应变 – Vilva

回答

0

此代码的工作

RewriteCond %{QUERY_STRING} ^PAGEN_1=1 [NC] 
RewriteRule ^news/$ http://www.mysite.ru/news/$ [R=301,L]