mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-17 21:49:04 +01:00
28 lines
817 B
ApacheConf
28 lines
817 B
ApacheConf
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|bin|cache|formwork|site|vendor)/.* index.php [L,NC]
|
|
|
|
## Prevent access to specific files
|
|
RewriteRule ^(.*)\.(md|yml|json|neon)/?$ index.php [L,NC]
|
|
RewriteRule ^(\.(.*)|LICENSE|composer\.lock)/?$ index.php [L,NC]
|
|
</IfModule>
|
|
|
|
## Disable access to directory indexes
|
|
Options -Indexes
|