Apache2:内部重定向限制

时间:2015-12-02 10:28:19

标签: php apache

我正在为应用程序开发REST接口。该接口与DB交互以记录一些数据并执行一些统计。在成功编写和测试之后,我执行了一些重构(我将一些数据库交互包装在不同的函数上并从之前的代码中调用它们)然后再次测试并得到了这个错误:

[Wed Dec 02 11:06:46.338128 2015] [core:error] [pid 9649] [client ::1:42760] 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.

[Wed Dec 02 11:06:46.338139 2015] [core:debug] [pid 9649] core.c(3534): [client ::1:42760] AH00121: r->uri = /rest/rest_functions.php
[Wed Dec 02 11:06:46.338147 2015] [core:debug] [pid 9649] core.c(3541): [client ::1:42760] AH00122: redirected from r->uri = /rest/rest_functions.php
[Wed Dec 02 11:06:46.338155 2015] [core:debug] [pid 9649] core.c(3541): [client ::1:42760] AH00122: redirected from r->uri = /rest/rest_functions.php
[Wed Dec 02 11:06:46.338163 2015] [core:debug] [pid 9649] core.c(3541): [client ::1:42760] AH00122: redirected from r->uri = /rest/rest_functions.php
[Wed Dec 02 11:06:46.338170 2015] [core:debug] [pid 9649] core.c(3541): [client ::1:42760] AH00122: redirected from r->uri = /rest/rest_functions.php
[Wed Dec 02 11:06:46.338178 2015] [core:debug] [pid 9649] core.c(3541): [client ::1:42760] AH00122: redirected from r->uri = /rest/rest_functions.php
[Wed Dec 02 11:06:46.338186 2015] [core:debug] [pid 9649] core.c(3541): [client ::1:42760] AH00122: redirected from r->uri = /rest/rest_functions.php
[Wed Dec 02 11:06:46.338193 2015] [core:debug] [pid 9649] core.c(3541): [client ::1:42760] AH00122: redirected from r->uri = /rest/rest_functions.php
[Wed Dec 02 11:06:46.338201 2015] [core:debug] [pid 9649] core.c(3541): [client ::1:42760] AH00122: redirected from r->uri = /rest/rest_functions.php
[Wed Dec 02 11:06:46.338208 2015] [core:debug] [pid 9649] core.c(3541): [client ::1:42760] AH00122: redirected from r->uri = /rest/rest_functions.php
[Wed Dec 02 11:06:46.338216 2015] [core:debug] [pid 9649] core.c(3541): [client ::1:42760] AH00122: redirected from r->uri = /rest/Jobmanager/next

我的.htacces文件(与之前版本相同的文件仍然相同)如下:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /rest/JobManager/rest_functions.php [L]
</IfModule>

从我对Apache和PHP工作的有限理解中,没有什么应该改变:我只是在重写过程之后添加了几个函数调用,所以Apache不应该看到任何区别。很明显,我错了,但我不明白。

编辑:似乎问题与我的PHP更改无关,我测试了未经实现的函数并得到了相同的错误。尽管如此,我昨天(代码工作时)和今天之间唯一的变化就是重构......

编辑2:我发现了问题,不知怎的,第二个.htaccess文件在存储库中找到了它的方式,当我今天早上拉它时,它将自己置于父目录中,开始重定向循环。

0 个答案:

没有答案