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

git-svn-id: http://svn.automattic.com/wordpress/trunk@6097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-09-12 20:44:41 +00:00
parent d1acf020b5
commit 1f3ce09d52

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'] )