2018-06-16 16:41:58 +02:00
|
|
|
AddDefaultCharset UTF-8
|
|
|
|
|
|
|
|
<IfModule mod_rewrite.c>
|
2018-06-16 17:49:27 +02:00
|
|
|
## Enable rewrite rules
|
|
|
|
RewriteEngine on
|
2018-06-16 16:41:58 +02:00
|
|
|
|
2020-12-19 15:57:29 +01:00
|
|
|
## Prevent direct access to Formwork folders but allow access to assets
|
|
|
|
RewriteRule ^site/templates/assets/.* - [L]
|
|
|
|
RewriteRule ^admin/(assets|avatars)/.* - [L]
|
|
|
|
RewriteRule ^(admin|backup|cache|formwork|site|vendor)/.* index.php [L]
|
2018-06-20 12:11:13 +02:00
|
|
|
|
2020-12-19 15:57:29 +01:00
|
|
|
## Prevent access to specific files
|
|
|
|
RewriteRule ^(.*)\.(md|yml|json)/?$ index.php [L]
|
2019-11-05 15:54:45 +01:00
|
|
|
RewriteRule ^(\.(.*)|LICENSE|composer\.lock)/?$ index.php [L]
|
2018-06-16 16:41:58 +02:00
|
|
|
|
2018-06-16 17:49:27 +02:00
|
|
|
## Let all URI be processed by index.php
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
2020-12-19 15:57:29 +01:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
2018-06-16 17:49:27 +02:00
|
|
|
RewriteRule ^.* index.php
|
2018-06-16 16:41:58 +02:00
|
|
|
</IfModule>
|
2020-12-19 15:57:29 +01:00
|
|
|
|
|
|
|
## Disable access to directory indexes
|
|
|
|
Options -Indexes
|