WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/canonical.php

    r30253 r29663  
    361361        unset($redirect['port']);
    362362
     363    if ( ! empty( $user_home['scheme'] ) && $user_home['scheme'] === 'https' ) {
     364        $redirect['scheme'] = 'https';
     365    }
     366
    363367    // trailing /index.php
    364368    $redirect['path'] = preg_replace('|/' . preg_quote( $wp_rewrite->index, '|' ) . '/*?$|', '/', $redirect['path']);
     
    418422        $redirect['host'] = $original['host'];
    419423
    420     $compare_original = array( $original['host'], $original['path'] );
     424    $compare_original = array( $original['scheme'], $original['host'], $original['path'] );
    421425
    422426    if ( !empty( $original['port'] ) )
     
    426430        $compare_original[] = $original['query'];
    427431
    428     $compare_redirect = array( $redirect['host'], $redirect['path'] );
     432    $compare_redirect = array( $redirect['scheme'], $redirect['host'], $redirect['path'] );
    429433
    430434    if ( !empty( $redirect['port'] ) )
Note: See TracChangeset for help on using the changeset viewer.