diff --git a/wp-includes/functions.php b/wp-includes/functions.php index e325301405..4453edb3a7 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -776,9 +776,9 @@ function status_header( $header ) { $text = 'Gone'; if ( substr(php_sapi_name(), 0, 3) == 'cgi' ) - @header("Status: $header $text"); - else @header("HTTP/1.1 $header $text"); + else + @header("Status: $header $text"); } function nocache_headers() { diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 4bb291fdbe..af162da90d 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -270,7 +270,8 @@ function wp_redirect($location, $status = 302) { if ( $is_IIS ) { header("Refresh: 0;url=$location"); } else { - status_header($status); // This causes problems on IIS + if ( php_sapi_name() != 'cgi-fcgi' ) + status_header($status); // This causes problems on IIS and some FastCGI setups header("Location: $location"); } }