Options -Indexes
DirectoryIndex index.php
ServerSignature Off
<FilesMatch "\.(sql|log|ini|env|dist|example|bak|old)$">
  Require all denied
</FilesMatch>
RewriteEngine On
# Preserve Authorization for PHP-FPM/CGI so the gateway can authenticate API calls.
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
