Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a subversion server that is working fine; however, I bought a tool that requires that the project have a "branches" subdirectory an is case sensitive. The entire repository already has projects with a "Branches" folder so I'm trying to write in a rewrite to the httpd.conf file. I've got the LoadModule uncommented and turned the RewriteEngine on, Apache starts but I don't get my desired result.

RewriteRule ^/Root/(.+)/branches(.*)  /Root/$1/Branches$2

If I use a RedirectMatch it works in the browser but still doesn't work in tool.

RedirectMatch ^/Root/(.+)/branches(.*)  /Root/$1/Branches$2 

I understand that Rewrite typically for rewriting to a file or physical location but I've seen some similar example when trying to solve mine. I am open to other approaches, I've looked into the < If > but it is beyond me.

share|improve this question
Could you describe your desired result? Does this tool you have use the apache server? If so, what URL does it use? –  Qben Sep 21 '13 at 5:49
@Qben I want svn/Root/ProjectA/branches to "redirect" on the server-side to svn/Root/ProjectA/Branches. Our SVN is running in apache and that is not going to change. –  Monso Sep 22 '13 at 23:33
Since RedirectMatch working in the browser but not in the tool your tool probably handle redirects faulty, unless it access some other strange URL that is not matched. Do you have any log showing what URL the tool uses? –  Qben Sep 23 '13 at 6:11
Mybe you could solve it without a RewriteRule or RedirectMatch using a symlink instead? –  Qben Sep 24 '13 at 6:06
I don't understand what so confusing about the question. Of course I know what URL to tool is trying to access. Symbolic links won't work since it is a virtual host, the paths don't exist on the drive. –  Monso Sep 24 '13 at 18:43

1 Answer 1

up vote 0 down vote accepted

Finally figured it out

    RewriteRule ^/Root/(.+)/branches(.*)  http://svn/Root/$1/Branches$2 [P]

Since it is virtual I needed to include the absolute web URL. Without the [P] flag (proxy) it was returning a 302 redirect, with the flag the server only handles the request and the client is simply returned the correct page from the single request.

share|improve this answer

Your Answer


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.