WordPress.org

Make WordPress Core

Ticket #11700: 11700.patch

File 11700.patch, 796 bytes (added by azaozz, 8 years ago)
  • wp-includes/canonical.php

     
    262262
    263263        $compare_original = array($original['host'], $original['path']);
    264264
    265         if ( !empty( $original['port'] ) )
     265        if ( !empty( $original['port'] ) && $original['port'] != 80 )
    266266                $compare_original[] = $original['port'];
    267267
    268268        if ( !empty( $original['query'] ) )
     
    285285                        $redirect_url .= '?' . $redirect['query'];
    286286        }
    287287
    288         if ( $redirect_url == $requested_url )
     288        if ( !$redirect_url || $redirect_url == $requested_url )
    289289                return false;
    290290
    291291        // Note that you can use the "redirect_canonical" filter to cancel a canonical redirect for whatever reason by returning FALSE