Options -MultiViews

RewriteEngine On

# Backend PHP en /api: no reescribir esas rutas
RewriteRule ^api(/|$) - [L]

# Servir archivos y directorios existentes (assets, etc.)
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Fallback SPA: rutas desconocidas cargan index.html
RewriteRule ^ index.html [L]
