But there is a situation: You lose the wrong URL, will also prompt 301
Transfer to others
In the process of using subversion, I've met many times.
Repository moved permanently to ' http://svn.jdkcn.com/labs/'; Please relocate
At first it was the code that checkout down and removed it first. It's good to checkout again. Later, the URL of switch to checkout was found as normal. The error was also searched on the Internet. But everyone else was checkout. I was in the SVN update when it happened. So it hasn't been solved.
Today we finally got the problem. This is the problem in the Subversion FAQ.
I can see my repository in a Web browser, but the ' svn checkout ' gives me an error is about "301 Moved permanently". What ' s wrong?It means your httpd.conf is misconfigured. Usually this error happens if you've defined the Subversion virtual "location" to exist within and different scopes at t He same time.
For example, if you've exported a repository as <location/www/foo>, but you've also set your documentroot to BE/WW W, then your ' re in trouble. When the request comes in For/www/foo/bar, Apache doesn ' t know whether to find a real file Named/foo/bar within your DOC Umentroot, or whether to ask MOD_DAV_SVN to fetch a file/bar from The/www/foo repository. Usually the former case wins, and hence the "Moved permanently" error.
The solution is to make sure your repository <Location> does notOverlap or live within any areas already exported as normal Web shares.
It's also possible that's the same object in the Web root which has the same name as your repository URL. For example, imagine your Web server ' s document root is/var/www and your Subversion repository is located at/home/svn/re Po. Configure Apache to serve the repository at Http://localhost/myrepo. If You then create the directory/var/www/myrepo/this would cause a 301 error to occur.
Chinese version:
I can view my repository from a Web browser, but an error occurred while executing ' svn checkout ': ' 301 Moved permanently '. That place went wrong. This means that there is a problem with your httpd.conf configuration, which usually happens when you set up a Subversion virtual directory that has two addressing methods at the same time.
For example, when you put the repository in the/www/foo directory, but you set up your repository's root directory as/www, you're in trouble. When someone requests a/www/foo/bar file, Apache will never know whether the file that the other person really wants to find is the/foo/bar in the root directory or the MOD_DAV_SVN module from the/www/foo repository. Bar file to get back, usually Apache's processing behavior is to take the former way, so there will be a "permanent transfer" such a mistake.
The solution to this problem is to make sure that your repository path does not overlap, or that there are paths that other network shares can access.
One possible reason for this problem is that there is a file (folder) with the same name as the repository's URL in the root directory of the Web site. For example, suppose your Web server's root directory is set at/var/www, your Subversion repository is placed in the/home/svn/repo directory, and then you configure the URL of the repository to Http://localhost/myrepo under Apache. If you now create a Myrepo directory under/var/www, you will also have a 301 error.
I have a lot of SVN repository under/svn/repos, so I put a index.html in/svn/repos to connect to the respective repository address. So just like the problem mentioned above, the/SVN/REPOS is configured as <location. So when you visit a repository/repos/xx, Apache is not sure to parse the file under/repos/xx. Or use MOD_SVN to access the version. But the weird thing is, I'm only in SVN. The update was only met when the SVN checkout was normal. But finally the problem was found. Change the original/svn/repos/index.html to a different directory and configure <Location> everything OK.