[Mediawiki-l] 2 domains on 1 Installtion?

Daniel Friesen lists at nadir-seen-fire.com
Sat Oct 29 13:52:51 UTC 2011


On Fri, 28 Oct 2011 14:25:01 -0700, Platonides <Platonides at gmail.com>  
wrote:

> Isabell Alcott wrote:
>> i dont even have $wgServer = "" in my LocalSettings.php
>
> That's right. You shouldn't set it to anything.
> The code in DefaultSettings (WebRequest::detectServer() in 1.18) will
> set it to the appropiate domain the users were coming to.
> I wonder if perhaps $_SERVER['SERVER_NAME'] is set to domain1 even when
> accessing through domain2. I never had problems with $wgServer being
> autodetected.

How the shared host was setup to point two domains at the site wasn't even  
mentioned iirc.

Frankly it's even possible that the host themselves is actually taking  
whatever 'extra domain' you give them and doing a dumb 301 or frame  
redirect instead of just doing what a ServerAlias would do.

Btw, we use HTTP_HOST first not SERVER_NAME.

-- 
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]



More information about the MediaWiki-l mailing list