Options -MultiViews
RewriteEngine On

# 1. Cho phép api/ execute PHP — KHÔNG redirect về index.html
RewriteRule ^api/ - [L]

# 2. sitemap.xml → api/sitemap.php (Google Search Console)
RewriteRule ^sitemap\.xml$ api/sitemap.php [L]

# 3. Cho phép file/thư mục thực tồn tại trên server
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# 4. React SPA — tất cả route còn lại → index.html
RewriteRule ^ index.html [L]
