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've got a mod_dav_svn apache webserver serving up a big tree of svn. I need to move a sub tree to a new server (not svn). Is there any way to use some kind of rewrite to redirect all of the sub tree so people visiting old URLs will be redirected to the new URLs?

Example my tree is like this

folder
  a
    file1.html
    file2.html
  b
    file3.html
    file4.html

I can currently access these, served by mod_dav_svn at

http://svn.server/svn/folder/a/
http://svn.server/svn/folder/a/file1.html
http://svn.server/svn/folder/a/file2.html
http://svn.server/svn/folder/b/
http://svn.server/svn/folder/b/file3.html
http://svn.server/svn/folder/b/file4.html

I want to copy b to some other server so that those files are accessible at new URLs. eg.

http://new.server/someplace/b/
http://new.server/someplace/b/file3.html
http://new.server/someplace/b/file4.html

And I want redirects from the old places to redirect to the new places

http://svn.server/svn/folder/b/           -> http://new.server/someplace/b/
http://svn.server/svn/folder/b/file3.html -> http://new.server/someplace/b/file3.html
http://svn.server/svn/folder/b/file4.html -> http://new.server/someplace/b/file4.html

The problem is, mod_dav_svn is controlling everything below /svn on svn.server Is there a way to configure apache or mod_dav_svn to do this redirect of the b subfolder ond the old server?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Should be able to redirect before mod_dav_svn takes over.

Redirect permanent /svn/folder/b/ http://new.server/someplace/b/
share|improve this answer
    
AWESOME! Works great! TY! –  gman Jul 27 '12 at 5:57

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.