2016-05-23 97 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]