Extension talk:Enforce Correct Virtual Host
Add topicAny user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).
Just a note to anyone wishing to use this extension. It works great, but has one side effect! For some reason whenever this extension is enabled, I cannot run any maintenance scripts. So I still recommend you use it, just comment it out in LocalSettings.php before you try to run any scripts. :-) --64.22.206.248 19:28, 17 November 2006 (UTC)
Note that the above conversation may have been edited or added to since the transfer. If in doubt, check the edit history.
Bug
[edit]In my server, SERVER_NAME returns only the domain. Then when I run it, makes a infinite loop redirecting www.domain.com to www.domain.com.ar because SERVER_NAME always returns domain.com
. I replace it with HTTP_HOST and works fine.--Eloy 20:57, 5 June 2008 (UTC)
Doesn't seem to work with lighttp 1.4.22 with php-cgi 5.2.6 - outputs: "Warning: Cannot modify header information - headers already sent by (output started at /www/wiki/extensions/xgForceVirtualHost.php:32) in /www/wiki/includes/WebResponse.php on line 16" - doesn't matter whether its included at beginning or end of LocalSettings.php
First error is most likely a .htaccess or vhost thing, make sure you don't already have something rewriting to say http://www.yourwiki.ext before using this extension. Second error, remove the ?> from the end of the php file. - Rgoodermote 21:17, 20 October 2009 (UTC)