简体   繁体   English

URL更改后,必须使用Apache重定向来处理绝对svn:external引用

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

So our Subversion server changed. 因此我们的Subversion服务器已更改。 And with it came a necessary url change, from https:// hostname of the previous machine, to a more apt https:// svn . 随之而来的是必要的url更改,从先前机器的https:// 主机名更改为更合适的https:// svn

Problem is, a lot of the externals use the absolute https://hostname/blah/blah/blah rather than ^/blah/blah/blah. 问题是,许多外部设备都使用绝对https:// hostname / blah / blah / blah而不是^ / 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. 为避免可能每次更改数百个外部设备一次结帐的麻烦,我被要求找出一种方法来利用http重定向使外部设备保持原样。

I've got this simple rule in the httpd.conf of the old server, which is still being used for other http services. 我在旧服务器的httpd.conf中有了一条简单的规则,该规则仍在用于其他 http服务。

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". 但这对于TortoiseSVN无效,我只是收到“存储库暂时移至' https:// svn / repo ';请重新定位”。 And on linux I just get "Unable to connect to a repository at URL 'https:// old hostname /repo/blah/blah'". 在Linux上,我只是得到“无法连接到URL'https:// 旧主机名 / 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'. 我必须将“重定向”更改为“重定向301”。

Probably should have been obvious. 可能应该是显而易见的。 But it works now. 但是现在可以了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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