Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: “Friendly HTTP Error Messages” causes 404


cce
Participant

@cce

If I understand correctly, there is code in pluggable.php that fixes an issue with IIS5 but it breaks newer versions. Disabling

header(“Refresh: 0;url=$location”);

and replacing it with

header(“Location: $location”, true, $status);

fixes the problem as below:

if ( $is_IIS ) {

//header(“Refresh: 0;url=$location”);

header(“Location: $location”, true, $status);

} else {

if ( php_sapi_name() != ‘cgi-fcgi’ )

status_header($status); // This causes problems on IIS and some FastCGI setups

header(“Location: $location”, true, $status);

}

Skip to toolbar