We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

tylerhall on 09/15/07


Tagged

svn htaccess apache web


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

basicmagic
Akiva


Deny Access to .svn Files From Web


Published in: Bash 


If your website is under version control, users may be able to access your .svn files. This mod_rewrite rule serves a 404 error page if they try to access them. Place the following lines in your website's .htaccess file.

  1. RewriteEngine On
  2. RedirectMatch 404 /\.svn(/|$)

Report this snippet 

You need to login to post a comment.