无脂框架URL错误

时间:2011-11-08 06:09:01

标签: php url fat-free-framework

我遇到了问题。我正在使用Ubuntu,我的所有文件都位于/var/www。它包含以下文件夹:

fatfree:contains the fat free framwork
F3Apps: contains index.php, .htaccess(contents shown below)

index.php的内容是

<?php
require '../fatfree/lib/base.php';
F3::route('GET /',function()
{
    echo "root  entered";   
});

F3::route('GET /about',function()
{
    echo "about  entered";  
});

F3::run();
?>

当我将网址设置为http://127.0.0.1/F3Apps/时,没关系,即它正在回显

root  entered

但是,当我将网址设置为http://127.0.0.1/F3Apps/about时,我得到以下信息: enter image description here

.htaccess内容如下所示(.htaccess位于文件F3Apps中):

# Enable rewrite engine and route requests to framework
RewriteEngine On
RewriteBase /F3Apps
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]

# Disable ETags
<IfModule mod_header.c>
    Header Unset ETag
    FileETag none
</IfModule>

# Default expires header if none specified (stay in browser cache for 7 days)
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A604800
</IfModule>

DocumentRoot "/var/www/html"
<Directory "/var/www/html">
    Options -Indexes FollowSymLinks Includes
    AllowOverride All
    Order allow,deny
    Allow from All
</Directory>

1 个答案:

答案 0 :(得分:1)

检查你的.htaccess,问题就在那里。或者为我们发布内容:)