by ionfish · 17y ago · 0 comments
# Disallow viewing of .svn and .git directory contents
<DirectoryMatch \.(svn|git)>
Order allow,deny
Deny from all
</DirectoryMatch>Oh. Now we're blacklisting.
If you are going to use this solution, you are better off blacklisting all dotfiles except .htaccess, assuming you allow it.
location ~ /\.(svn|git) { deny all; }
# Disallow viewing of .svn and .git and .hg directory contents
<Directory ~ \.(svn|git|hg)>
Order allow,deny
Deny from all
</Directory>