block access to the .git directory

This commit is contained in:
2023-09-06 12:25:00 +10:00
parent e1fc2fa271
commit 8d78b15751

View File

@@ -13,6 +13,9 @@
RewriteEngine On
# Block access to .git directory
RewriteRule .*\.git/.* - [L,R=404]
# Force HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]