Prevent access to subversion .svn directories

Discussion in 'Install/Configuration' started by subBlue, Oct 24, 2006.

  1. subBlue

    subBlue New Member

    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.
  2. subBlue

    subBlue New Member

    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?
  3. xing

    xing LiteSpeed Staff

    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".

Share This Page