diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000000000000000000000000000000000000..ffc14ead41b2879c9fedcd4ffba5430c2fbd6de2 --- /dev/null +++ b/.htaccess @@ -0,0 +1,24 @@ +# Enable rewrite engine and route requests to framework +RewriteEngine On + +RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$ +RewriteRule ^(.*)$ - [E=BASE:%1] + +RewriteCond %{REQUEST_URI} \.ini$ +RewriteRule \.ini$ - [R=404] +<FilesMatch "\.(ini|cfg|csv|bak|swp|swo|log|sql|sh|json|gitignore)$"> + RewriteRule .* - [R=404,L] +</FilesMatch> + +RewriteCond %{REQUEST_FILENAME} setup\.php$ +RewriteRule .* - [R=404,L] +RewriteCond %{REQUEST_FILENAME} functions\.php$ +RewriteRule .* - [R=404,L] +RewriteCond %{REQUEST_FILENAME} bootstrap\.php$ +RewriteRule .* - [R=404,L] + +RewriteCond %{REQUEST_FILENAME} !-l +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule .* %{ENV:BASE}/index.php [L,QSA] +RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]