简体   繁体   中英

Necessary Apache Redirect to handle absolute svn:external references after a url change

So our Subversion server changed. And with it came a necessary url change, from https:// hostname of the previous machine, to a more apt https:// svn .

Problem is, a lot of the externals use the absolute https://hostname/blah/blah/blah rather than ^/blah/blah/blah. And this has obviously led to a lot of failures.

To prevent the headache of change possibly hundreds of externals one checkout at a time, I've been asked to figure out a way to utilize http redirects to allow the externals to stay as they are for now.

I've got this simple rule in the httpd.conf of the old server, which is still being used for other http services.

Redirect /repo/ https://svn/repo/

And that works fine for the web browsing of our repositories. But it doesn't work for TortoiseSVN, I just get "Repository moved temporarily to ' https://svn/repo '; please relocate". And on linux I just get "Unable to connect to a repository at URL 'https:// old hostname /repo/blah/blah'".

Is this possible at all? I hope it is and I just need a different form of redirect.

Nevermind. I'm too new to this. I had to change 'Redirect' to 'Redirect 301'.

Probably should have been obvious. But it works now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM