すべてのトラフィックをROOT/public / index.phpにリダイレクトし、URLをgetリクエストに入れるphpフレームワークを構築しています。私の問題は、RewriteCondsが機能せず、ファイルとフォルダー名を受け入れていることです。
ルートディレクトリ内
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
<files .htaccess>
order allow,deny
deny from all
</files>
パブリックディレクトリ
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
</IfModule>