formwork/.htaccess

28 lines
808 B
ApacheConf
Raw Normal View History

AddDefaultCharset utf-8
<IfModule mod_mime.c>
AddCharset utf-8 .css .js .svg
</IfModule>
2018-06-16 16:41:58 +02:00
<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
2023-07-29 22:39:28 +02:00
## Let all URI be processed by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.* index.php [L]
2020-12-19 15:57:29 +01:00
## Prevent direct access to Formwork folders but allow access to assets
RewriteRule ^site/templates/assets/.* - [L]
2023-07-02 17:41:08 +02:00
RewriteRule ^panel/assets/.* - [L]
2022-11-27 21:21:19 +01:00
RewriteRule ^(panel|backup|cache|formwork|site|vendor)/.* index.php [L,NC]
2020-12-19 15:57:29 +01:00
## Prevent access to specific files
RewriteRule ^(.*)\.(md|yml|json)/?$ index.php [L,NC]
RewriteRule ^(\.(.*)|LICENSE|composer\.lock)/?$ index.php [L,NC]
2018-06-16 16:41:58 +02:00
</IfModule>
2020-12-19 15:57:29 +01:00
## Disable access to directory indexes
Options -Indexes