Options -Indexes

# Proteger archivos de configuración
<FilesMatch "^(config|db|auth|helpers)\.php$">
    Order Allow,Deny
    Deny from all
</FilesMatch>

# Proteger install.php después de instalación (descomentarlo luego):
# <Files "install.php">
#     Order Allow,Deny
#     Deny from all
# </Files>

# Rewrite para URLs limpias (opcional)
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # Forzar HTTPS (descomentar si hay SSL)
    # RewriteCond %{HTTPS} off
    # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

# Caché de assets
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css              "access plus 1 week"
    ExpiresByType application/javascript "access plus 1 week"
</IfModule>

# Seguridad básica
<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
    Header set X-Frame-Options "SAMEORIGIN"
    Header set X-XSS-Protection "1; mode=block"
    Header 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
