How to disallow browsing of .svn directories on your server Oct 6 2009

If you deploy projects live out of Subversion repositories to public web servers, here’s a good tip for denying access to the .svn directories to keep people from snooping around your files.

Edit your global Apache config file (httpd.conf) or .htaccess file to include the following directive:

# Disallow any .svn directory browsing
<directory ~ "\.svn">
Order allow,deny
Deny from all

This will tell apache to not serve up any directories that are called .svn.

Tags: , ,

Leave a Reply

sell diamonds