apache htaccess-在比赛期间重定向循环
正如我想我有一个简单的情况...
我在.htaccess文件中有重写,看起来像这样:
RewriteRule ^(?:abc|bca|cab)$ page.html
该规则的目的是将url当url看起来像eg
现在,我必须将其更改为更快,然后对此进行了更改:
RewriteRule ^[^/]+$ page.html
在此规则中,它应该匹配任何不'/'的字符,并且该规则会导致重定向循环。更改之后,我得到了内部服务器错误页面和来自Apache的错误日志:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace
我尝试添加[L]标志,但没有帮助。 我不知道会发生什么,它应该起作用。
as I suppose I have a simple case...
I had RewriteRule in .htaccess file which looked like this:
RewriteRule ^(?:abc|bca|cab)$ page.html
The goal of this rule was to redirect to page.html when url looks like e.g. http://website.com/abc
and It worked.
Now I have to change it to be more responsive and I made change to this:
RewriteRule ^[^/]+$ page.html
In this rule it should match any characters which are not '/' and this rule leads to redirection loop. After this change I got Internal Server Error page and error log from Apache:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace
I tried to add [L] flag but It didn't help.
I have no idea what happen, it should work..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论