Canonical: remove unused code (commented-out) from redirect_canonical().

Props hakre, chriscct7.
Fixes #16934.


git-svn-id: https://develop.svn.wordpress.org/trunk@34734 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-10-01 05:08:31 +00:00
parent 0e2f9b5019
commit c28bc82d4b

View File

@ -67,14 +67,9 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
}
$original = @parse_url($requested_url);
if ( false === $original )
if ( false === $original ) {
return;
// Some PHP setups turn requests for / into /index.php in REQUEST_URI
// See: https://core.trac.wordpress.org/ticket/5017
// See: https://core.trac.wordpress.org/ticket/7173
// Disabled, for now:
// $original['path'] = preg_replace('|/index\.php$|', '/', $original['path']);
}
$redirect = $original;
$redirect_url = false;