/ Published in: PHP
Wordpress - 404 problem on physical directories. From the Support Forum.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
add_filter( 'status_header', 'mf_hack_404', 10 ); function mf_hack_404( $c ) { $header = '200'; $text = get_status_header_desc( $header ); $protocol = $_SERVER["SERVER_PROTOCOL"]; if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) $protocol = 'HTTP/1.0'; return "$protocol $header $text"; } else return $c; }
URL: http://wordpress.org/support/topic/404-on-custom-non-wordpress-pages