Prevent access to subversion .svn directories

subBlue

Active Member
#1
We use subversion to deploy our websites and I was wondering how I could configure litespeed so that all requests to .svn directories and files within them are blocked?

Thanks.
 

subBlue

Active Member
#2
In answer to my own question I found that I can add this to the rewrite rules for each virtual host:

Code:
RewriteRule ^(.*/)?\.svn/ - [F,L]
ErrorDocument 403 "Access Forbidden"
However, is it possible to set it server-wide rather than have to go through each VH?
 

xing

LiteSpeed Staff
#3
LiteSpeed context rule is faster than rewrite rule.

Context rule to disable all access to .files.

Static
exp:^\/\.
Location: /an_emptry_folder/
Accessible: No

With 3.0 Release, all dot prefixed files .svn, etc, will not be accessible. Most likely it will be an option checkbox in "Server -> Security".
 
Top