Make WordPress Core


Ignore:
Timestamp:
11/12/2008 09:27:19 PM (16 years ago)
Author:
markjaquith
Message:

Canonical now only redirects to a different domain if the domains differ by their yes-www/no-www status. fixes #5089

File:
1 edited

Legend:

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

    r9645 r9646  
    239239
    240240    // Ignore differences in host capitalization, as this can lead to infinite redirects
    241     if ( strtolower($original['host']) == strtolower($redirect['host']) )
     241    // Only redirect no-www <=> yes-www
     242    if ( strtolower($original['host']) == strtolower($redirect['host']) ||
     243        ( strtolower($original['host']) != 'www.' . strtolower($redirect['host']) && 'www.' . strtolower($original['host']) != strtolower($redirect['host']) ) )
    242244        $redirect['host'] = $original['host'];
    243245
Note: See TracChangeset for help on using the changeset viewer.