2026-09-01 19:22:48 +02:00
|
|
|
RewriteEngine On
|
|
|
|
|
RewriteBase /
|
2026-09-01 19:26:10 +02:00
|
|
|
Options -Indexes
|
|
|
|
|
|
|
|
|
|
# The public/ directory must be the virtual host document root. This file is
|
|
|
|
|
# defense in depth only and cannot protect files in parent directories.
|
|
|
|
|
RewriteRule "(^|/)[.]" - [F,L]
|
2026-09-01 19:22:48 +02:00
|
|
|
|
|
|
|
|
# Keep real assets accessible and route application requests through the front controller.
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
|
|
|
|
RewriteCond %{REQUEST_FILENAME} -d
|
|
|
|
|
RewriteRule ^ - [L]
|
|
|
|
|
RewriteRule ^ index.php [L]
|
|
|
|
|
|
2026-09-01 19:26:10 +02:00
|
|
|
# Deny common sensitive artifacts if this file is accidentally reused elsewhere.
|
|
|
|
|
<FilesMatch "^(\.env|.*\.(sql|log|ini|yaml|yml|json|lock))$">
|
2026-09-01 19:22:48 +02:00
|
|
|
Require all denied
|
|
|
|
|
</FilesMatch>
|