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

We currently have a subversion server at for internal (and occasionally external) use. Currently, the repositories are located at /svn/[project] via SVNParentPath. However, management wants to make them also available at just /[project]. I was able to get it seemingly working with some mod_rewrite directives:

#Don't redirect (internally, note the PT (passthrough)) any trac or admin pages 
RewriteCond %{REQUEST_URI} !^/trac.*$
RewriteCond %{REQUEST_URI} !^/admin.*$
RewriteCond %{REQUEST_URI} !^/svn.*$
RewriteRule ^/(.*)$ /svn/$1 [PT,NS,QSA]

This seems to work, but fails when checking out or performing any other actual SVN operations. My theory is that DAV reports its URL as /svn/[project], and the client aborts when this doesn't match its requested url of /[project].

How would you solve this?

share|improve this question
Let me guess; a 301 in response to the PROPFIND? – Shane Madden May 27 '11 at 18:23
Actually, no. A 500 in response to REPORT. The server complains "Unusable URI: it does not refer to this repository" when the client sends the XML entitty S:src-path as "[project]/trunk"; in the REPORT request. Ironically, the client is sending the to the[project]/!svn/vcc/default URI, so its all kind of confused! I think this problem is unsolvable without a more intelligent DAV implementation or a proxy application that can modify the requests themselves. – Mark May 30 '11 at 17:48

Could you not just use both things?

<Location "/">
....setup for management
SVNParentPath /path/to/repos

<Location "/svn">
...stuff for /svn/project
SVNParentPath /path/to/repos
share|improve this answer
I don't believe so, because DAV svn at Location "/" will gobble all requests. – Mark May 27 '11 at 19:24
Believeing is not knowing, have you even tried? – evildead May 29 '11 at 1:49
I did. With <Location />, no other location directives are processed. Sorry. – Mark May 30 '11 at 17:22

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.