Options -Indexes -MultiViews
DirectoryIndex index.php
RewriteEngine On

# Archivos internos y ocultos; denegar acceso directo a datos sensibles.
RewriteRule (^|/)\.(?!well-known(?:/|$)) - [F,L]
RewriteRule ^(?:app|config|database|storage|vendor|tests|backups)(?:/|$) - [F,L,NC]
RewriteRule ^(?:composer\.(?:json|lock)|README(?:\.md)?|INSTALACION-CPANEL\.md|phpunit\.xml|.*\.(?:sql|log|bak|ini|env|dist|sh))$ - [F,L,NC]

# Permitir certificados SSL emitidos desde /.well-known/
# Redireccionar al front controller si no existe archivo/directorio.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php82” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
