Canonical: Apply redirects to HEAD requests too. Adjusts [28958].
props SergeyBiryukov. fixes #27498. Built from https://develop.svn.wordpress.org/trunk@29663 git-svn-id: http://core.svn.wordpress.org/trunk@29437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b80c5d3e51
commit
4417e75e2c
|
@ -39,7 +39,7 @@
|
||||||
function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||||
global $wp_rewrite, $is_IIS, $wp_query, $wpdb;
|
global $wp_rewrite, $is_IIS, $wp_query, $wpdb;
|
||||||
|
|
||||||
if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'GET' !== $_SERVER['REQUEST_METHOD'] ) {
|
if ( isset( $_SERVER['REQUEST_METHOD'] ) && ! in_array( strtoupper( $_SERVER['REQUEST_METHOD'] ), array( 'GET', 'HEAD' ) ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue