Htacces Apache END Flag alternative
I wrote a small framework (PHP) for small projects, which in all should be
redirected to index.php?path=$1, except the defined paths. With the END
flag this is not problematic. But the END flag exists still since Apache
2.3 and the script should work also on apache 2.2 servers.
Has anyone an idea how I can realize this without the END flag?
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]
No comments:
Post a Comment