Return to Snippet

Revision: 31052
at August 28, 2010 02:34 by kyuumeitai


Initial Code
add_filter( 'status_header', 'mf_hack_404', 10 );
function mf_hack_404( $c ) {
	if( defined( 'GALLERY_NAME' ) ) {
		$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;
}

Initial URL
http://wordpress.org/support/topic/404-on-custom-non-wordpress-pages

Initial Description
Wordpress - 404 problem on physical directories. From the Support Forum.

Initial Title
Wordpress - 404 problem on physical directories

Initial Tags
wordpress

Initial Language
PHP