RewriteEngine On

# Many shared-hosting Apache/PHP-FPM setups strip the Authorization header by
# default. This line makes sure it always reaches PHP so admin login works.
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

# Never let this folder's PHP errors leak raw HTML into an API response
php_flag display_errors off
