Deny access to .git dir on live site
authorSteve Youngs <steve@sxemacs.org>
Fri, 5 Nov 2010 01:45:05 +0000 (11:45 +1000)
committerSteve Youngs <steve@sxemacs.org>
Fri, 5 Nov 2010 01:45:05 +0000 (11:45 +1000)
Signed-off-by: Steve Youngs <steve@sxemacs.org>
.htaccess

index 8f51224..3d3a1b9 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -2,3 +2,7 @@ Options Indexes Includes
 XBitHack On
 AddType text/html .template
 AddOutputFilter INCLUDES .template
 XBitHack On
 AddType text/html .template
 AddOutputFilter INCLUDES .template
+
+# deny access to the toplevel .git directory
+RewriteEngine On
+RewriteRule \.git - [F,L]