Options -Indexes
DirectoryIndex index.html

# Bloquea el acceso directo a la configuración y archivos internos
<FilesMatch "^(config\.php|lib\.php|.*\.sqlite|.*\.log)$">
  <IfModule mod_authz_core.c>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    Order allow,deny
    Deny from all
  </IfModule>
</FilesMatch>

# Fuerza HTTPS (las contraseñas no deben viajar sin cifrar)
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP:X-Forwarded-Proto} !=https
  RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
