# Place in the backend/ web root. Lets you call /api/auth/login instead of api.php?path=auth/login
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^api/(.*)$ api.php?path=$1 [QSA,L]

# Make sure Authorization header reaches PHP (some hosts strip it)
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
