.htaccess 重写秒。太多的内部重定向。限制内部递归。
此代码的行为与条件的顺序不同: 此代码有效.htaccess 重写秒。太多的内部重定向。限制内部递归。,.htaccess,redirect,mod-rewrite,url-rewriting,.htaccess,Redirect,Mod Rewrite,Url Rewriting,此代码的行为与条件的顺序不同: 此代码有效 RewriteCond %{HTTP_HOST} ^(www.)?mypage.com$ [NC] RewriteCond %{REQUEST_URI} !test/[NC] RewriteCond %{REQUEST_URI} !x/ [NC] RewriteCond %{REQUEST_URI} !test2/ [NC] RewriteRule ^(.*)$ /test2/$1 [L] 这一个不起作用-内部服务器错误550- RewriteCon
RewriteCond %{HTTP_HOST} ^(www.)?mypage.com$ [NC]
RewriteCond %{REQUEST_URI} !test/[NC]
RewriteCond %{REQUEST_URI} !x/ [NC]
RewriteCond %{REQUEST_URI} !test2/ [NC]
RewriteRule ^(.*)$ /test2/$1 [L]
这一个不起作用-内部服务器错误550-
RewriteCond %{HTTP_HOST} ^(www.)?mypage.com$ [NC]
RewriteCond %{REQUEST_URI} !test2/[NC]
RewriteCond %{REQUEST_URI} !x/ [NC]
RewriteCond %{REQUEST_URI} !test/ [NC]
RewriteRule ^(.*)$ /test2/$1 [L]
服务器日志:
由于可能的配置错误,请求超出了10个内部重定向的限制。如有必要,使用“LimitInternalRecursion”增加限制
这是怎么形成的?为什么只有其中一种情况?这只是一个很难注意到的打字错误。其中一个条件中的最终参数之间没有空格 在这里更容易发现:
RewriteCond%{REQUEST\u URI}!foo/[NC]
发生这种情况时,您将键入什么作为URL?内部服务器错误(500)。看起来像是一个重定向循环,我无法理解。