-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
24 lines (19 loc) · 859 Bytes
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Enable rewrite engine and route requests to framework
RewriteEngine On
# Match all files that don't end with [#6] and are not [#7] and redirect to index
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} !\.(png|jpg|jpeg|gif|css|js)$ [NC]
RewriteCond %{REQUEST_URI} !^/(debug|initialise).php$
RewriteRule ^((?!index\.php).+)$ %{ENV:BASE}/index.php [L]
# Match all directories that are not root and respond with 403
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^((?!/).+)$ - [F]
RewriteCond %{REQUEST_URI}::$1 ^(.*?/)(.*)::\2$
RewriteRule ^(.*)$ - [E=BASE:%1]
RewriteCond %{REQUEST_URI} \.ini$
RewriteRule \.ini$ - [R=404]
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]