# Apache: send every request that is not a real file to index.php.
Options -Indexes
<IfModule mod_rewrite.c>
    RewriteEngine On
    # agent API / MCP: Apache hides the Authorization header from PHP unless it is copied into the environment
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [QSA,L]
</IfModule>
<FilesMatch "\.(php)$">
    <If "%{REQUEST_URI} !~ m#^/index\.php#">
        Require all denied
    </If>
</FilesMatch>
