DirectoryIndex index.php index.html index.htm
Options -Indexes
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<FilesMatch ".(db|md|twig|yaml|yml)|(composer|package).json$">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine on
#RewriteBase /path/to/app
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-
RewriteCond %{REQUEST_URI} !^/assets/ [NC]
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ ./index.php [L]
</IfModule>
# Error 404
ErrorDocument 404 /assets/static/404.html
# Error 500
ErrorDocument 500 /assets/static/500.html