我遇到了問題。我正在使用Ubuntu,我的所有文件都位於/var/www
。它包含以下文件夾:Fat Free Framework URL錯誤
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();
?>
當我在設置URL爲http://127.0.0.1/F3Apps/,這是確定的,即它是呼應
root entered
但是,當我將URL設置爲http://127.0.0.1/F3Apps/about時,出現以下錯誤:
項的內容的.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>
有什麼叫「無脂架構」?大聲笑! –