Detect port the server is running on; needed for redirects and other full URLs
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 13 Mar 2004 11:28:05 +0000 (11:28 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 13 Mar 2004 11:28:05 +0000 (11:28 +0000)
includes/DefaultSettings.php

index 332d486..11eae78 100644 (file)
@@ -11,7 +11,9 @@ $wgVersion                    = "1.3.0pre-alpha";
 $wgSitename         = "MediaWiki"; # Please customize!
 $wgMetaNamespace    = FALSE; # will be same as you set $wgSitename
 
-$wgServer           = "http://" . getenv( "SERVER_NAME" );
+$wgServer           = "http://" . $_SERVER["SERVER_NAME"];
+if( $_SERVER["SERVER_PORT"] != 80 ) $wgServer .= ":" . $_SERVER["SERVER_PORT"];
+
 $wgScriptPath      = "/wiki";
 
 # ATTN: Old installations used wiki.phtml and redirect.phtml -