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

git-svn-id: https://develop.svn.wordpress.org/trunk@6097 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-09-12 20:44:41 +00:00
parent 2c1f68efe3
commit 88c31f17b1
1 changed files with 4 additions and 0 deletions

View File

@ -132,6 +132,10 @@ if ( $redirect_url )
if ( $redirect['path'] == $user_home['path'] )
$redirect['path'] = trailingslashit($redirect['path']);
// Ignore differences in host capitalization, as this can lead to infinite redirects
if ( strtolower($original['host']) == strtolower($redirect['host']) )
$redirect['host'] = $original['host'];
if ( array($original['host'], $original['path'], $original['query']) !== array($redirect['host'], $redirect['path'], $redirect['query']) ) {
$redirect_url = $redirect['scheme'] . '://' . $redirect['host'] . $redirect['path'];
if ( $redirect['query'] )