forked from syseleven/shared-secrets
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.htaccess
36 lines (33 loc) · 1.62 KB
/
.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
25
26
27
28
29
30
31
32
33
34
35
36
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# prevent access to certain locations
RewriteRule ^(\/)?\.dockerignore$ /index.php [L]
RewriteRule ^(\/)?\.env(\.default)?$ /index.php [L]
RewriteRule ^(\/)?\.git(\/.*)?$ /index.php [L]
RewriteRule ^(\/)?\.gitattributes$ /index.php [L]
RewriteRule ^(\/)?\.gitignore$ /index.php [L]
RewriteRule ^(\/)?\.htaccess$ /index.php [L]
RewriteRule ^(\/)?CHANGELOG(\.md)?$ /index.php [L]
RewriteRule ^(\/)?ENCRYPTION(\.md)?$ /index.php [L]
RewriteRule ^(\/)?LICENSE(\.md)?$ /index.php [L]
RewriteRule ^(\/)?README(\.md)?$ /index.php [L]
RewriteRule ^(\/)?SECURITY(\.md)?$ /index.php [L]
RewriteRule ^(\/)?Dockerfile$ /index.php [L]
RewriteRule ^(\/)?router\.php$ /index.php [L]
RewriteRule ^(\/)?defaults(\/.*)?$ /index.php [L]
RewriteRule ^(\/)?(html\/)?actions(\/.*)?$ /index.php [L]
RewriteRule ^(\/)?(html\/)?config(\/.*)?$ /index.php [L]
RewriteRule ^(\/)?(html\/)?db(\/.*)?$ /index.php [L]
RewriteRule ^(\/)?(html\/)?lib(\/.*)?$ /index.php [L]
RewriteRule ^(\/)?(html\/)?pages(\/.*)?$ /index.php [L]
RewriteRule ^(\/)?(html\/)?template(\/.*)?$ /index.php [L]
# redirect direct accesses
RewriteCond %{REQUEST_URI} ^(\/)?resources(\/.*)?$ [OR]
RewriteCond %{REQUEST_URI} ^(\/)?vendors(\/.*)?$
RewriteCond %{DOCUMENT_ROOT}/html/%{REQUEST_URI} -f
RewriteRule . /html/$0 [R=302,L]
# single entrypoint
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /index.php [L]
</IfModule>