From 8d78b157516398b1baab32ff6b13ee3a02d26ff7 Mon Sep 17 00:00:00 2001 From: James Collins Date: Wed, 6 Sep 2023 12:25:00 +1000 Subject: [PATCH] block access to the .git directory --- public/.htaccess | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/.htaccess b/public/.htaccess index 1a44680..19f7a27 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -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]