WordPress.org

Make WordPress Core

Ticket #21602: canonical.php.patch

File canonical.php.patch, 959 bytes (added by sreedoap, 8 years ago)
  • canonical.php

     
    405405                        $redirect_url .= '?' . $redirect['query'];
    406406        }
    407407
    408         if ( !$redirect_url || $redirect_url == $requested_url )
     408        if ( !$redirect_url || strcasecmp($redirect_url, $requested_url) == 0 )
    409409                return false;
    410410
    411411        // Hex encoded octets are case-insensitive.
     
    421421        // Note that you can use the "redirect_canonical" filter to cancel a canonical redirect for whatever reason by returning false
    422422        $redirect_url = apply_filters('redirect_canonical', $redirect_url, $requested_url);
    423423
    424         if ( !$redirect_url || $redirect_url == $requested_url ) // yes, again -- in case the filter aborted the request
     424        if ( !$redirect_url || strcasecmp($redirect_url, $requested_url) == 0 ) // yes, again -- in case the filter aborted the request
    425425                return false;
    426426
    427427        if ( $do_redirect ) {