Options -Indexes
RewriteEngine On

# Preserve Authorization for PHP/FastCGI on shared hosting (required by the ATM API).
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%1]

<FilesMatch "^(?!index\.php$).*\.php$">
    Require all denied
</FilesMatch>

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

