Options -Indexes

RewriteEngine On

# Fix for Authorization header in CGI environment
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%1]

# Allow direct file access
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Route everything to index.php
RewriteRule ^ index.php [QSA,L]
