I've changed my LocalSettings.php file to change some settings based on the subdomain
that it comes under. Example:
texas.domain.com will swap out the logo to a texas based
logo. Everything seems to work ok except for saving after editting a page. When the form
gets submitted, the url for the article page changed from
texas.domain.com to
domain.com.
I thought it had to do with the action on the form, but it doesn't. The search form
on the page has an action very similar and the domain stays
texas.domain.com. I went
throught the code and traced it to the getFullURL() function in includes/Title.php. It
builds the url from the $wgServer var and $this->getLocalUrl. The $wgServer var is set
to just 'domain.com', so thats where things get messed up. $wgServer variable
gets set in the includes/DefaultSettings.php file from the $wgProto.'://' .
$_SERVER['SERVER_NAME'];
My question is I overwrote the $wgServer variable in my LocalSettings.php file to use
$_SERVER["HTTP_HOST"] instead and preserve the subdomain. Does anyone know if
this will mess anything up? It seems to work ok so far, and it fixed the problem with
saving a page. Oh yeah I'm using mediawiki-1.3.2.
Adam