diff --git a/wp-includes/rest-api.php b/wp-includes/rest-api.php index fd6dc3e5f9..3b158ea07f 100644 --- a/wp-includes/rest-api.php +++ b/wp-includes/rest-api.php @@ -324,6 +324,11 @@ function get_rest_url( $blog_id = null, $path = '/', $scheme = 'rest' ) { $url .= '/' . ltrim( $path, '/' ); } else { $url = trailingslashit( get_home_url( $blog_id, '', $scheme ) ); + // nginx only allows HTTP/1.0 methods when redirecting from / to /index.php + // To work around this, we manually add index.php to the URL, avoiding the redirect. + if ( 'index.php' !== substr( $url, 9 ) ) { + $url .= 'index.php'; + } $path = '/' . ltrim( $path, '/' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 0896b3350a..690317afd6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41138'; +$wp_version = '4.9-alpha-41139'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.