Options -Indexes
DirectoryIndex index.php
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L,NE]
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
RewriteRule ^(config|data|lib)/ - [F,L,NC]
RewriteRule ^(\.env|site-domain\.php|lib\.php|source\.php|vpn_guard\.php)$ - [F,L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
<FilesMatch "^(\.env|site-domain\.php|lib\.php|source\.php|vpn_guard\.php|composer\.(json|lock))$">
Require all denied
</FilesMatch>
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
