forked from getformwork/formwork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
27 lines (21 loc) · 808 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
25
26
27
AddDefaultCharset utf-8
<IfModule mod_mime.c>
AddCharset utf-8 .css .js .svg
</IfModule>
<IfModule mod_rewrite.c>
## Enable rewrite rules
RewriteEngine on
## Let all URI be processed by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.* index.php [L]
## Prevent direct access to Formwork folders but allow access to assets
RewriteRule ^site/templates/assets/.* - [L]
RewriteRule ^panel/assets/.* - [L]
RewriteRule ^(panel|backup|cache|formwork|site|vendor)/.* index.php [L,NC]
## Prevent access to specific files
RewriteRule ^(.*)\.(md|yml|json)/?$ index.php [L,NC]
RewriteRule ^(\.(.*)|LICENSE|composer\.lock)/?$ index.php [L,NC]
</IfModule>
## Disable access to directory indexes
Options -Indexes