RewriteEngine On

# Keep direct access to real files
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Route every API request to the PHP dispatcher
RewriteRule ^ index.php [QSA,L]
