問題が発生しています。私は 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();
?>
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>