[Mediawiki-l] Problem loading index.php externally

Brion Vibber brion at pobox.com
Wed Feb 23 22:29:19 UTC 2005


Matt C wrote:
> I'm running a MediaWiki site on my local Mac OS X (10.3 client)
> webserver - http://knowyourmac.com (also accessible at
> http://knowyourmac.homeip.net).
>
> The problem is, unless you specify a page name, such as "Main_Page" or
> "Introduction" in the address, the address resolves into a local name,
> which won't load externally.

HTTP redirects require a full URL, including the hostname. (Many
browsers accept sloppy relative pathnames, but this is not standard and
shouldn't be relied upon.) So when sending HTTP redirects, MediaWiki
uses the hostname and port number that the web server claims to be at.
If your server is hidden behind an alternate name this sometimes sends
you where you didn't want to be.

Add an override to $wgServer in your LocalSettings.php, like this:
$wgServer = "http://example.com";

this should include the 'http://' and the hostname but no path.

If you need to override the path portion, set $wgScript and
$wgArticlePath appropriately.

-- brion vibber (brion @ pobox.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://lists.wikimedia.org/pipermail/mediawiki-l/attachments/20050223/7f131724/attachment.pgp 


More information about the MediaWiki-l mailing list