httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [users@httpd] a rather tricky mod_rewrite problem?
Date Sat, 15 Nov 2008 19:11:13 GMT
RewriteCond %{REMOTE_USER} ^([a-z0-9_]+)$
RewriteRule ^/mysvn/(.*) /svn/%1/$1 [L]

The first line places a valid username into %1.
The second rewrites "/mysvn/something" to "/svn/bob/something" when
the REMOTE_USER is "bob".
Invalid usernames will not pass the condition so "/mysvn" should
display an error or login page when the Rewrite is bypassed.


On 11/14/08, morgan gangwere <> wrote:
>  I've got a tricky question... How would one go about having it so that
>  mod_auth and mod_rewrite talk to one anther like this:
>  i have the file structure /var/svn/
>  It is to be used for WebDAV svn access -- its attached on the server to /svn/
>  I want it so that if a user (lets say "bob") authenticates you get
>  /var/svn/users/bob/ not /var/svn/ for /svn/
>  and if "steve" logs in,
>  /var/svn/users/steve/ for /svn/
>  Any way to do this? or am i going to have to do the old trick of doing
>  /svn/(username) and writing a PHP script to handle them?
>  Morgan gangwere

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message