# Serve index.html when visiting the folder (works on all hosts)
DirectoryIndex index.html

<IfModule mod_rewrite.c>
RewriteEngine On

# Route all non-file requests to index.html
# This ensures URLs with merge tag delimiters (*, $, |, {}, etc.) load correctly
# Real files (gate.html, fingerprint.js) are served directly via the !-f condition
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.html [QSA,L]
</IfModule>

# Prevent directory listing
Options -Indexes

# Allow special characters in URLs
<IfModule mod_security.c>
SecFilterEngine Off
</IfModule>
