Prevent access to subversion .svn directories

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

  1. subBlue

    subBlue Active 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?

  2. subBlue

    subBlue Active Member

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

    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.

    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