Options -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On

# Bloquear carpetas privadas si el proyecto queda por error dentro del webroot.
RewriteRule ^(app|config|database|storage|tools)(/|$) - [F,L]

# Enviar tráfico hacia public/ cuando el document root no se pudo configurar.
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^$ public/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/index.php [QSA,L]
</IfModule>

<FilesMatch "\.(env|ini|log|sql|md|json)$">
Require all denied
</FilesMatch>
