RewriteEngine On

# Keep existing files/directories as-is
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Route friendly URLs to PHP files
RewriteRule ^platform/?$ platform.php [L,QSA]
RewriteRule ^webhook/?$ webhook.php [L,QSA]
RewriteRule ^health/?$ health.php [L,QSA]
RewriteRule ^api/?$ api.php [L,QSA]
