Apache 重写P标志不起作用的规则
我在.htaccess中放置了重写规则:Apache 重写P标志不起作用的规则,apache,.htaccess,mod-rewrite,proxy,Apache,.htaccess,Mod Rewrite,Proxy,我在.htaccess中放置了重写规则: RewriteCond %{HTTP_HOST} ^demo\.test\.ch$ [NC] RewriteRule (.*) http://www.test.ch/plu/sub/%{REQUEST_URI}?%{QUERY_STRING}&id=3 [P] 当我尝试访问url demo.test.ch时,在我的错误日志中有如下内容 demo.test.ch/plu/sub/plu/sub/plu/sub/plu/sub/plu/sub/pl
RewriteCond %{HTTP_HOST} ^demo\.test\.ch$ [NC]
RewriteRule (.*) http://www.test.ch/plu/sub/%{REQUEST_URI}?%{QUERY_STRING}&id=3 [P]
当我尝试访问url demo.test.ch时,在我的错误日志中有如下内容
demo.test.ch/plu/sub/plu/sub/plu/sub/plu/sub/plu/sub/plu/sub/plu/sub/plu/sub/plu/sub/plu/sub/plu/sub/&id=3&id=3&id=3&id=3&id=3&id=3&id=3
直到我有一个比URL太长的错误
我的问题是:为什么我的代理复制到很多时候的url
谢谢。为什么您的
RewriteCond
上有[NC]
?这两种旗子在那里都没有意义。是的,没有[NC]会更好!!!现在我只有两次了!:D>demo.test.ch/plu/sub/plu/sub。。有没有办法知道为什么我有两次?我刚换了服务器,现在也有同样的问题-(…有人知道怎么弄明白吗?谢谢