200 ERROR SOLVED
-
Looks like I found the solution on a dead site thankfully cached by google… use at your own risk…
Thanks to the long dead https://www.sukasuka.org for the fix…
200 OK
The document has moved here.After looking at the code, I found the culprit in file wp-includes/classes.php. I commented out the line that says status_header( 200 ) and that seems to solve the 200 HTTP status problem.
function handle_404() {
global $wp_query;
// Issue a 404 if a permalink request doesn’t match any posts. Don’t
// issue a 404 if one was already issued, if the request was a search,
// or if the request was a regular query string request rather than a
// permalink request.
if ( (0 == count($wp_query->posts)) && !is_404() && !is_category() && !is_search() && ( $this->did_permalink || (!empty($_SERVER[‘QUERY_STRING’]) && (false === strpos($_SERVER[‘REQUEST_URI’], ‘?’))) ) ) {
$wp_query->set_404();
status_header( 404 );
} elseif( is_404() != true ) {
// status_header( 200 );
}
}
- The topic ‘200 ERROR SOLVED’ is closed to new replies.