From dd2f0fdc4d10a8ff092b31c658b1f25061e9a8b6 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Wed, 21 Oct 2015 16:23:26 +0200 Subject: [PATCH] Block access to .git directory via web server --- .htaccess | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.htaccess b/.htaccess index 8fdf534..c9099d0 100644 --- a/.htaccess +++ b/.htaccess @@ -6,3 +6,6 @@ RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE] Options +ExecCGI AddHandler cgi-script .py DirectoryIndex index.py + +# Don't allow access to .git folder for security reasons +RedirectMatch 404 /\.git