]> git.mxchange.org Git - friendica.git/commitdiff
improved lockout of version control directories from browsing
authorFriendika <info@friendika.com>
Tue, 9 Nov 2010 22:10:33 +0000 (14:10 -0800)
committerFriendika <info@friendika.com>
Tue, 9 Nov 2010 22:10:33 +0000 (14:10 -0800)
.htaccess

index 75b3e7a8110d58850fd3cb88d1669ed9c30efd3f..65578e2356255c0936a308164d5670788a8b432d 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -2,13 +2,16 @@
 Options -Indexes
 AddType application/x-java-archive .jar
 
-<FilesMatch "\.(out|log|git)$">
+<FilesMatch "\.(out|log)$">
 Deny from all
 </FilesMatch>
 
 <IfModule mod_rewrite.c>
   RewriteEngine on
 
+  # Protect dot directories from browsing, e.g. ".git"
+  RewriteRule "(^|/)\." - [F]
+
   # Rewrite current-style URLs of the form 'index.php?q=x'.
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d