Last modified: 2014-07-31 12:25:39 UTC
If I set up two wikis in one server and link them using interwiki links (iw_local=1), the redirect http://domain.com/wiki1/index.php/wiki2:Main_Page does not work (I get "Bad title" error) and vice versa. However, if I set up two wikis in two servers and link *them* using interwiki links (iw_local=1), the redirect http://wiki1.domain.com/index.php/wiki2:Main_Page *does* work. The problem is caused by line 141 of Wiki.php, when the following "if" statement is used to choose whether to redirect, or to show a "Bad title" error message: /* Check for a redirect loop */ if ( !preg_match( '/^' . preg_quote( $this->getVal('Server'), '/' ) . '/', $url ) && $title->isLocal() ) $url is the redirected URL, and the if statement checks if we redirect within the same server. It's good for Wikimedia sites, but not good for sites which use two wikis in one server. Why is this check necessary at all? Which URL can cause a redirect loop?
Are you putting relative paths in the interwiki table? If so, this is probably bug 18664.
(In reply to comment #1) > Are you putting relative paths in the interwiki table? If so, this is probably > bug 18664. > No, the URLs are absolute. The bug still exists. The line in includes/Wiki.php is now 196.
+testme
Relevant code is now on line 236 of includes/MediaWiki.php. Removed testme, as this code hasn't changed since 2006 when this was filed. No idea how this should be fixed. Seems evil to me.