Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a set up with apache and subversion

In the apache configuration i have

<Location /svn>
  DAV svn
  SVNParentPath c:/svn
</Location>

Now i have multiple repositories

a
a_b
a_c
a_b_c
a_b_d
b

and i want to map them as

a/svn
a/b/svn
a/c/svn
a/b/c/svn
a/b/d/svn
b/svn

to do this without adding directives and restarting apache i tought of making this rules

RewriteEngine On

RewriteCond $1 !=svn
RewriteCond $2 !=svn

RewriteRule ^/([^/]+)/(.*?)/svn/(.*)$ /$1_$2/svn/$3 [N]
RewriteRule ^/([^/]+)/svn/(.*)$ /svn/$1/$2 [L,PT]

this way i rewrite them to

/svn/a
/svn/a_b
/svn/a_c
/svn/a_b_c
/svn/a_b_d
/svn/b

The objective is that the client don't have the notion of this happening

when a acess is made to a folder without trailing slash the mod dav return a redirect to the folder with the trailing slash exposing my internal url.

can i rewrite the outgoing url ?!

share|improve this question
1  
What is the requirement driving the need to make these changes without adding directives and restarting Apache? –  mlschechter Sep 7 '10 at 0:06

1 Answer 1

Have you tried setting DirectorySlash off ? It would prevent apache redirecting to the dir with trailing slash..

share|improve this answer
    
it worked for me - apache was diverting everything looked like a directory (including svn repo root) to have / at the end. Thanks! –  asdmin Feb 6 '11 at 10:44

Your Answer

 
discard

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.