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
|
|
|
|
2018-06-16 17:49:27 +02:00
|
|
|
## Prevent direct access to Formwork folders
|
2018-06-19 15:40:18 +02:00
|
|
|
## but allow access to template assets
|
|
|
|
RewriteRule ^templates/assets/.* - [L]
|
2018-06-16 17:49:27 +02:00
|
|
|
RewriteRule ^(cache|config|formwork|templates|vendor)/.* index.php [L]
|
|
|
|
RewriteRule ^(.*)\.(yml|md)$ - [R=404,L]
|
2018-06-16 16:41:58 +02:00
|
|
|
|
2018-06-16 17:49:27 +02:00
|
|
|
RewriteRule ^admin/(accounts|languages|logs|schemes|src|views)/.* admin/index.php [L]
|
2018-06-16 16:41:58 +02:00
|
|
|
|
2018-06-16 17:49:27 +02:00
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteRule ^admin/.* admin/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
|
|
|
|
RewriteRule ^.* index.php
|
2018-06-16 16:41:58 +02:00
|
|
|
</IfModule>
|