Make WordPress Core

Ticket #21077: multisite-custom-port.patch

File multisite-custom-port.patch, 945 bytes (added by djzone, 13 years ago)

Multisite custom port patch

  • ms-settings.

    # diff -Naru ms-settings.orig ms-settings.php
    old new  
    3030               } elseif ( substr( $domain, -4 ) == ':443' ) {
    3131                       $domain = substr( $domain, 0, -4 );
    3232                       $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -4 );
     33               } else if( defined( 'WP_CUSTOM_PORT' ) && substr( $domain, 0 - ( strlen( WP_CUSTOM_PORT ) + 1 ) == ':' . WP_CUSTOM_PORT ) ) {
     34                       $colonpos = 0 - ( strlen( WP_CUSTOM_PORT ) + 1 );
     35                       $domain = substr( $domain, 0, $colonpos );
     36                       $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, $colonpos );
    3337               } else {
    3438                       wp_load_translations_early();
    3539                       wp_die( __( 'Multisite only works without the port number in the URL.' ) );