3 ms·
For your Apache config. # Disallow viewing of .svn and .git directory contents <DirectoryMatch \.(svn|git)> Order allow,deny Deny from all </Dire
by ionfish 17y ago
For your Apache config.
# Disallow viewing of .svn and .git directory contents
<DirectoryMatch \.(svn|git)>
Order allow,deny
Deny from all
</DirectoryMatch>
- patio11 17y agoFor Nginx: location ~ /\.(svn|git) { deny all; }
- bcl 17y agoMay as well throw in .hg 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.
- djdarkbeat 17y agoAs well as leaving .gitignore exposed also.
- deleted 17y ago[deleted]
- djdarkbeat 17y ago# Disallow viewing of .svn and .git and .hg directory contents <Directory ~ \.(svn|git|hg)> Order allow,deny Deny from all </Directory>