mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 23:57:41 +02:00
trying Ryan's suggestion for #3215
git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4411066167
commit
57ff8770c0
@ -2228,8 +2228,10 @@ function status_header( $header ) {
|
|||||||
elseif ( 410 == $header )
|
elseif ( 410 == $header )
|
||||||
$text = 'Gone';
|
$text = 'Gone';
|
||||||
|
|
||||||
@header("HTTP/1.1 $header $text");
|
if ( substr(php_sapi_name(), 0, 3) == 'cgi' )
|
||||||
@header("Status: $header $text");
|
@header("HTTP/1.1 $header $text");
|
||||||
|
else
|
||||||
|
@header("Status: $header $text");
|
||||||
}
|
}
|
||||||
|
|
||||||
function nocache_headers() {
|
function nocache_headers() {
|
||||||
|
@ -265,7 +265,8 @@ function wp_redirect($location, $status = 302) {
|
|||||||
if ( $is_IIS ) {
|
if ( $is_IIS ) {
|
||||||
header("Refresh: 0;url=$location");
|
header("Refresh: 0;url=$location");
|
||||||
} else {
|
} 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");
|
header("Location: $location");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user