Revert changes to canonical that broke redirects. Props fitztrev. fixes #5961
git-svn-id: http://svn.automattic.com/wordpress/trunk@6998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1e2c4818e8
commit
b793e1846f
|
@ -178,12 +178,6 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
|
||||||
if ( strtolower($original['host']) == strtolower($redirect['host']) )
|
if ( strtolower($original['host']) == strtolower($redirect['host']) )
|
||||||
$redirect['host'] = $original['host'];
|
$redirect['host'] = $original['host'];
|
||||||
|
|
||||||
// prevent notices in the comparison below
|
|
||||||
$original['query'] = isset($redirect['query'])? $redirect['query'] : false;
|
|
||||||
$original['port'] = isset($redirect['port'])? $redirect['port'] : false;
|
|
||||||
$redirect['query'] = isset($redirect['query'])? $redirect['query'] : false;
|
|
||||||
$redirect['port'] = isset($redirect['port'])? $redirect['port'] : false;
|
|
||||||
|
|
||||||
if ( array($original['host'], $original['port'], $original['path'], $original['query']) !== array($redirect['host'], $redirect['port'], $redirect['path'], $redirect['query']) ) {
|
if ( array($original['host'], $original['port'], $original['path'], $original['query']) !== array($redirect['host'], $redirect['port'], $redirect['path'], $redirect['query']) ) {
|
||||||
$redirect_url = $redirect['scheme'] . '://' . $redirect['host'];
|
$redirect_url = $redirect['scheme'] . '://' . $redirect['host'];
|
||||||
if ( isset($redirect['port']) )
|
if ( isset($redirect['port']) )
|
||||||
|
|
Loading…
Reference in New Issue