6
小規模なプロジェクト用に小さなフレームワーク(PHP)を作成しました。これは、定義済みのパスを除き、すべてindex.php?path = $ 1にリダイレクトする必要があります。 ENDフラグでは問題ありません。しかし、ENDフラグはApache 2.3以降に存在し、スクリプトはApache 2.2サーバでも動作するはずです。Htacces Apache END Flagの代替方法
私はENDフラグなしでこれをどのように実現できるのでしょうか?
RewriteEngine on
# Define static redicts
RewriteRule ^image/(.+)$ public/image/$1 [END,QSA]
RewriteRule ^css/(.+)$ public/css/$1 [END,QSA]
RewriteRule ^js/(.+)$ public/js/$1 [END,QSA]
RewriteRule ^lib/js/core/(.+)$ core/lib/js/$1 [END,QSA]
RewriteRule ^lib/js/(.+)$ public/lib/js/$1 [END,QSA]
RewriteRule ^cache/(.+)$ public/cache/$1 [END,QSA]
RewriteRule ^download/(.+)$ public/download/$1 [END,QSA]
# Define custom redicts
RewriteRule ^page/([0-9]+)$ index.php?path=index.php&page=$1 [END,QSA]
# Define all other redicts
RewriteRule ^(.+)$ index.php?path=$1 [L,QSA]