summaryrefslogtreecommitdiffstats
path: root/wpmu-settings.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-29 11:56:31 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-29 11:56:31 +0000
commit5c7dc4bbad2e866713faf2b4cf73c1f9148c7001 (patch)
treeae8df84afd1cdda54bd0d7eccdf72e4e744fcc5a /wpmu-settings.php
parentd8d10865df4718102d91a9e6895a40c1a3bc2fca (diff)
downloadwordpress-mu-5c7dc4bbad2e866713faf2b4cf73c1f9148c7001.tar.gz
wordpress-mu-5c7dc4bbad2e866713faf2b4cf73c1f9148c7001.tar.xz
wordpress-mu-5c7dc4bbad2e866713faf2b4cf73c1f9148c7001.zip
Strip port 80 from HTTP_HOST. Fixes #238 and #245
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@871 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wpmu-settings.php')
-rw-r--r--wpmu-settings.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/wpmu-settings.php b/wpmu-settings.php
index c7a48fa..ad5f9c2 100644
--- a/wpmu-settings.php
+++ b/wpmu-settings.php
@@ -8,7 +8,12 @@ $domain = addslashes( $_SERVER['HTTP_HOST'] );
if( substr( $domain, 0, 4 ) == 'www.' )
$domain = substr( $domain, 4 );
if( strpos( $domain, ':' ) ) {
- die( 'WPMU only works without the port number in the URL.' );
+ if( substr( $domain, -3 ) == ':80' ) {
+ $domain = substr( $domain, 0, -3 );
+ $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -3 );
+ } else {
+ die( 'WPMU only works without the port number in the URL.' );
+ }
}
$domain = preg_replace('/:.*$/', '', $domain); // Strip ports
if( substr( $domain, -1 ) == '.' )