htdocs/MVC/ フォルダーに .htaccess ファイルがあり、次のようになります
RewriteEngine On
# if its already been rewritten to the specific folder
RewriteCond %{REQUEST_URI} ^/MVC/public/img/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/MVC/public/index.php$
# skip next two rules
RewriteRule .? - [S=2]
# rewrite image requests
RewriteRule (.*\.(jpg|png|gif))$ public/img/$1 [L]
# rewrite all other requests to the front controller index.php
RewriteRule (.*) public/index.php?url=$1 [QSA,L]
私が達成したいのは、フォルダー MVC/public/img に送信されるすべての画像要求と、フォルダー MVC/public 内のフロント コントローラー index.php に送信される他のすべての要求です。これらのルールを設定し、mod_rewrite がループするのを防ぐには、これが最善の方法ですか?