Changeset 871

Show
Ignore:
Timestamp:
01/29/07 11:56:31 (2 years ago)
Author:
donncha
Message:

Strip port 80 from HTTP_HOST. Fixes #238 and #245

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wpmu-settings.php

    r834 r871  
    99        $domain = substr( $domain, 4 ); 
    1010if( strpos( $domain, ':' ) ) { 
    11         die( 'WPMU only works without the port number in the URL.' ); 
     11        if( substr( $domain, -3 ) == ':80' ) { 
     12                $domain = substr( $domain, 0, -3 ); 
     13                $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -3 ); 
     14        } else { 
     15                die( 'WPMU only works without the port number in the URL.' ); 
     16        } 
    1217} 
    1318$domain = preg_replace('/:.*$/', '', $domain); // Strip ports