Canonical: Apply redirects to HEAD requests too. Adjusts [28958].
props SergeyBiryukov. fixes #27498. git-svn-id: https://develop.svn.wordpress.org/trunk@29663 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2f71d7d8e4
commit
7c09b36829
@ -39,7 +39,7 @@
|
||||
function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user