0
votes

I would like to grant read/write access for one of our development team to access only a particular sub directory in a SVN repository. I achieved this using the directive "AuthzSVNAccessFile" in subversion.conf(httpd).

Let Say I am having the following directory structure in my svn repo:
- Workspace
      - Branches
             - Mobile
                   - App
                         - Phase1
                         - Phase2
                         - Phase3 (This is the directory I want to grant) .....

Phase3 can be accessible by our dev team using the below url
       http://mydomain.com/svn/Workspace/Branches/Mobile/App/Phase3

How do I create a short url like the following to access the above one.
       http://mydomain.com/svn/Phase3

Please help me to get this done. Thanks.

My apache configurations are below:
<Location /Phase3>
     DAV svn
     ReWriteEngine On
     ReWriteRule ^Phase3$  Workspace/Branches/Mobile/App/Phase3
     SVNParentPath /var/www/svn
     AuthzSVNAccessFile /var/www/svn/Workspace/conf/authz
     Require valid-user
     AuthType Basic
     AuthName "Subversion repositories"
     AuthUserFile /etc/svn-auth-users
</Location>

1
I tried rewrite module too. But It doesn't work.sudesh
And "It doesn't work" means what? Are we meant to guess that?arkascha
Sorry for my bad communication. It's not working.sudesh
Short URL - long headache. Can't see benefits here - URL will be entered only once and can be copy&past'ed alsoLazy Badger

1 Answers

0
votes

Preface: I never used it for SVN-locations and I'll try to avoid it in future, but you have to test. I can't explain in simple words, why I try to avoid Alias directive, you can think about it as about my "interbal voice"

Face:

I consider mod_rewrite for this simple case as overkill and suggest to start with mod_alias. "...mod_alias is designed to handle simple URL manipulation tasks..."

Inside corresponding container (location or vhost, but I'll start from outside and before SVN-Location definition)

Redirect /svn/Phase3 /svn/Workspace/Branches/Mobile/App/Phase3

If Phase3 in turn, is node, not leaf, you may to have to use RedirectMatch directive