WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/12/2007 08:44:41 PM (13 years ago)
Author:
markjaquith
Message:

Ignore HOST capitalization differences for canonical redirects. props jbctech. fixes #4773

File:
1 edited

Legend:

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

    r6085 r6097  
    133133        $redirect['path'] = trailingslashit($redirect['path']);
    134134
     135    // Ignore differences in host capitalization, as this can lead to infinite redirects
     136    if ( strtolower($original['host']) == strtolower($redirect['host']) )
     137        $redirect['host'] = $original['host'];
     138
    135139    if ( array($original['host'], $original['path'], $original['query']) !== array($redirect['host'], $redirect['path'], $redirect['query']) ) {
    136140        $redirect_url = $redirect['scheme'] . '://' . $redirect['host'] . $redirect['path'];
Note: See TracChangeset for help on using the changeset viewer.