Here are three ways in Apache to block access to the .svn folders.
With access controls:
1 2 3 4 |
<Directory ~ "\.svn"> Order allow,deny Deny from all </Directory> |
With rewrite rule:
1 |
RewriteRule ^(.*/)?\\.svn/ - [F,L] |
With redirect:
1 |
RedirectMatch 404 /\\.svn(/|$) |
These come from the excellent MDLog:/sysadmin blog at:
http://www.ducea.com/2006/08/11/apache-tips-tricks-deny-access-to-some-folders/