Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 无脂路由不';无法使用虚拟主机_Php_Fat Free Framework - Fatal编程技术网

Php 无脂路由不';无法使用虚拟主机

Php 无脂路由不';无法使用虚拟主机,php,fat-free-framework,Php,Fat Free Framework,我在Ubuntu上的Apache上用FatFree框架开发了一个应用程序,效果很好。我没有使用任何虚拟主机配置,index.php位于服务器根目录中 现在,我已经创建了一个虚拟主机,我还想处理一个新项目,我将以前的项目移动到服务器根目录的子文件夹中。我已经正确地完成了虚拟主机配置 问题- 我在index.php中定义了许多路由。主路径,F3::route('GET/','Main->front_page')映射正确,因此第一页显示良好。但是,任何其他路线都不匹配。具体地说,我有一个routeF3

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

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

问题-

我在index.php中定义了许多路由。主路径,
F3::route('GET/','Main->front_page')
映射正确,因此第一页显示良好。但是,任何其他路线都不匹配。具体地说,我有一个route
F3::route('GET/captcha','Main->security\u 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文件,它与
index.php
位于同一文件夹中,并且位于
/var/www
的子文件夹
/oresoft

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

这是我之前使用的同一个htaccess文件。我刚刚将其移动到子文件夹中,并更改了
RewriteBase

显示您的.htaccess文件。这是一个关键组件。编辑了问题并包含了htaccess文件的内容。在
VirtualHost*
部分中是否有
Options+FollowSymLinks
?选项索引FollowSymLinks多视图(是的,我有)似乎
/captcha
路由正在重新路由回
index.php
。如果您发布了
index.php
Main
类的相关内容,那么可能会给我们带来更多帮助,这样我们就可以消除猜测了。向我们展示您的.htaccess文件。这是一个关键组件。编辑了问题并包含了htaccess文件的内容。在
VirtualHost*
部分中是否有
Options+FollowSymLinks
?选项索引FollowSymLinks多视图(是的,我有)似乎
/captcha
路由正在重新路由回
index.php
。如果您发布了
index.php
Main
类的相关内容,也许会给我们带来更多帮助,这样我们就可以消除猜测了。