Make WordPress Core

Ticket #27927: 27927.diff

File 27927.diff, 715 bytes (added by jeremyfelt, 12 years ago)
  • src/wp-includes/ms-settings.php

     
    3535                $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -4 );
    3636        }
    3737
     38        // www is an illegal subdomain in multisite. If it exists in the requested URL,
     39        // we strip it so that template_redirect initiates the proper 301
     40        if ( is_subdomain_install() && substr( $domain, 0, 4 ) == 'www.' ) {
     41                $domain = substr( $domain, 4 );
     42        }
     43
    3844        $path = strtolower( stripslashes( $_SERVER['REQUEST_URI'] ) );
    3945        if ( is_admin() ) {
    4046                $path = preg_replace( '#(.*)/wp-admin/.*#', '$1/', $path );