如何解除内部重定向最大数量限制?
有时,但不经常,我会在错误日志中看到这些行:
[Sun Feb 20 11:53:38 2011] [error] [client 89.123.45.38]
mod_rewrite: maximum number of internal redirects reached.
Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase
the limit if neccessary.
[Sun Feb 20 11:53:38 2011] [error] [client 89.123.45.38]
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.
含义? 首先,它是什么意思?这是否意味着某些用户会因为达到每次页面访问的 x 重定向限制而看到损坏的页面?
解决方案? 我进行了 mod 重写,以对原本丑陋的 /page.php?ln=de 设置各种美化,现在是 /de/page 等...在这些页面中,类似 20 个 PHP 生成的图像也被重写为更好的图像 URL。这是否意味着我必须将限制设置为高于此处提到的 10?是每秒 10 次还是每次访问 10 次?
如何在 htaccess 中更改它? 非常感谢对此错误的任何提示。
Sometimes, not often, I see these lines in the error log:
[Sun Feb 20 11:53:38 2011] [error] [client 89.123.45.38]
mod_rewrite: maximum number of internal redirects reached.
Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase
the limit if neccessary.
[Sun Feb 20 11:53:38 2011] [error] [client 89.123.45.38]
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.
MEANING?
First of all, what does it mean? Does it mean that some users will see a broken page just because the limit of x redirects per page visit has reached?
SOLUTION?
I have mod rewrite to set up various beautifications of otherwise ugly /page.php?ln=de that are now /de/page etc... within those pages something like 20 PHP-generated images are also rewritten to nicer image urls. Does this mean I have to set the limit higher than the 10 mentioned here? Is that 10 per second or 10 per visit or?
How can I change it in htaccess?
Any hint to this error is much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这通常意味着您在重写时出现错误,导致无限循环。通常,极限阻止它变得无限。
当它说:
这意味着在一个请求中它已被重写 10 次。这是很多次,除非您有非常复杂的重写规则,否则很可能会发生循环。
That usually means you have an error in your rewrites causing an infinite loop. The limit catches it from becoming infinite as a rule.
When it says:
That means in one request it has been rewritten 10 times. That is a lot, and unless you have very complex rewrite rules going on, you most likely have a loop occurring.