DirectoryIndex index.php
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(?:includes|articles|database|bin|tests)(?:/|$) - [F,L]
RewriteRule ^(?:README\.md|UPGRADE\.md|TEST-REPORT\.md|.*\.sql|.*\.log|.*\.zip)$ - [F,L,NC]
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^localhost [NC]
RewriteCond %{HTTP_HOST} !^127\.0\.0\.1
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+?)/?$ $1.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ 404.php [L]
</IfModule>
<FilesMatch "^(settings\.example\.php|schema\.sql|router\.php)$">
Require all denied
</FilesMatch>
<IfModule mod_headers.c>
Header always set X-Content-Type-Options nosniff
</IfModule>
