Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
<Location "/site">
    Allow from all
    ProxyPass ajp://localhost:8009/site

<Location "/site2">
    Allow from all
    ProxyPass ajp://localhost:8009/site2

<Location /svn>
     DAV svn
     SVNParentPath /home/svn
     SVNListParentPath On
     AuthType Basic
     AuthName "Subversion Repository"
     AuthUserFile /etc/subversion/passwd
        Require valid-user

RewriteEngine On
#RewriteCond %{HTTPS} off
RewriteCond  %{query_string}  !^/svn/.*
RewriteRule (.*) %{HTTP_HOST}%{REQUEST_URI}
RewriteRule (.*) ajp://localhost:8009/$1 [P]

my problem that the Rule is applied on /svn Location and gives always //svn please help

share|improve this question
You may get better answers when you write a clearer title and describe in the question what you want to accomplish and what you're seeing instead. The question is unclear now. – Martijn Heemels Jul 28 '12 at 1:16

Your RewriteCond matches on svn/ because you don't want to accidentally match svnabc, but then, of course, it won't match svn without trailing slash either. Maybe /svn(/.*)?$ is closer to what you want, i.e. "start with /svn, and then maybe something else, but that'll have to start with a slash"?

share|improve this answer
Thank you for help but i cant understand you my problem that how i can escape applying RewriteRule on my /svn URL it always gives //svn can I apply deferent RewriteRule for every Location or i have to add a special RewriteCond – user1558865 Jul 28 '12 at 8:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.