formwork/.htaccess
2018-08-29 13:31:32 +02:00

25 lines
821 B
ApacheConf
Executable File

AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
## Enable rewrite rules
RewriteEngine on
## Prevent direct access to Formwork folders
## but allow access to template assets
RewriteRule ^templates/assets/.* - [L]
RewriteRule ^(cache|config|formwork|templates|vendor)/.* index.php [L]
RewriteRule ^(.*)\.(md|yml|json)/?$ index.php [L]
RewriteRule ^(LICENSE|composer\.lock|\.gitignore|\.php_cs|nginx.conf)/?$ index.php [L]
RewriteRule ^admin/(accounts|languages|logs|schemes|src|views)/.* admin/index.php [L]
RewriteRule ^admin/gulpfile\.js/?$ admin/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^admin/.* admin/index.php [L]
## Let all URI be processed by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.* index.php
</IfModule>