RewriteEngine On

# Forzar HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Redirigir raíz a splash
RewriteRule ^$ public/splash.php [L]

# Ocultar extensiones .php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

# Proteger carpetas sensibles
RewriteRule ^includes/ - [F,L]
RewriteRule ^conexion\.php$ - [F,L]
