如何解除内部重定向最大数量限制?

发布于 2024-10-18 10:13:33 字数 836 浏览 1 评论 0原文

有时,但不经常,我会在错误日志中看到这些行:

[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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小嗷兮 2024-10-25 10:13:33

这通常意味着您在重写时出现错误,导致无限循环。通常,极限阻止它变得无限。

当它说:

“由于可能的原因,请求超出了 10 个内部重定向的限制
配置错误。”

这意味着在一个请求中它已被重写 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:

"Request exceeded the limit of 10 internal redirects due to probable
configuration error."

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文