Options -Indexes
DirectoryIndex index.php
ErrorDocument 404 /404.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^(localhost|127\.0\.0\.1)(:[0-9]+)?$ [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^(?:includes|private|tests|database|bin)(?:/|$) - [F,L]
RewriteRule ^(?:README|VALIDATION|SETUP).* - [F,L,NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1.php -f
RewriteRule ^([a-z-]+)/?$ $1.php [L,QSA]
</IfModule>
<FilesMatch "(^\.|\.sqlite|\.log$|\.example\.php$)">
Require all denied
</FilesMatch>

<FilesMatch "\.(sql|md|txt)$">
Require all denied
</FilesMatch>
