2

我在 Ubuntu 上的 Apache 上使用 FatFree 框架开发了一个应用程序,它运行良好。我没有使用任何虚拟主机配置,并且 index.php 位于服务器根目录中。

现在,我已经创建了一个虚拟主机,我也想处理一个新项目,我将以前的项目移动到服务器根目录的子文件夹中。我已经正确完成了虚拟主机配置。

问题 -

我在 index.php 中定义了许多路由。主页路线F3::route('GET /', 'Main->front_page')已正确映射,因此第一页正常显示。但是,任何其他路线都不匹配。具体来说,我有一条路线F3::route('GET /captcha', 'Main->security_code')给我一个 500 错误。

apache错误日志中的错误日志如下 -

[Thu Aug 16 12:48:49 2012] [error] [client 127.0.0.1] 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.
[Thu Aug 16 12:48:49 2012] [debug] core.c(3112): [client 127.0.0.1] r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /oresoft/index.php
[Thu Aug 16 12:48:49 2012] [debug] core.c(3118): [client 127.0.0.1] redirected from r->uri = /captcha
[Thu Aug 16 12:48:49 2012] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 624 to 382 : URL /oresoft/index.php

我在这里错过了什么吗?为什么一条路线匹配而其他路线不匹配?

以下是我的 .htaccess 文件,它与 .htaccess 位于同一文件夹中,index.php并且位于 .htaccess 的子文件夹/oresoft/var/www

RewriteEngine On
RewriteBase /oresoft
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]

这是我之前拥有的同一个 htaccess 文件。我只是将它移到子文件夹中并更改了RewriteBase.

4

0 回答 0