0

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 ?!

Filipe Pinheiro
  • 157
  • 1
  • 7
  • 1
    What is the requirement driving the need to make these changes without adding directives and restarting Apache? – mlschechter Sep 07 '10 at 00:06

1 Answers1

1

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

Wrikken
  • 981
  • 9
  • 22
  • it worked for me - apache was diverting everything looked like a directory (including svn repo root) to have / at the end. Thanks! – asdmin Feb 06 '11 at 10:44