htaccess的请求超过了10内部重定向的限制,由于可能的配置错误 [英] htaccess Request exceeded the limit of 10 internal redirects due to probable configuration error
问题描述
我在日志中出现此错误。 htaccess的是如下:
I get this error in my logs. The htaccess is as follows:
RewriteEngine On
RewriteRule ^(.*)$ ?path=$1 [QSA]
,是一个问题的答案: 将路径转换为一赠变量
and is an answer to the question: Convert path to one get variable
我通过 http://htaccess.madewithlove.be/ 测试,它说,code应该工作。我假设这code保持重定向,但如何我不知道。任何帮助将大大AP preciated因为我完全陷入深水区。
I tested it via http://htaccess.madewithlove.be/ and it says that the code SHOULD work. I'm assuming that this code keeps redirecting but how it does I have no idea. Any help would be greatly appreciated as I'm totally in the deep end.
编辑:
完整的错误日志如下:
AH00124:请求超过了10内部重定向的限制,由于可能的配置错误。使用'LimitInternalRecursion'如果有必要提高限制。使用LogLevel的调试,以得到一个回溯。
Full error log is as follows:
AH00124: 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.
推荐答案
我的坏,我的previous答案是错的。当然,有一个重定向循环与此有关。我们一定要添加的RewriteCond检查是否已经有一个路径参数,这意味着已经被重定向。
My bad, my previous answer was wrong. Of course there is an redirection loop with this. We have to add a RewriteCond to check if there is already a "path" parameter, which means there already have been a redirection.
试试这个:
RewriteCond %{QUERY_STRING} !path=
RewriteRule ^(.*)$ ?path=$1 [QSA,L]
这篇关于htaccess的请求超过了10内部重定向的限制,由于可能的配置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!