From 7b2d91b0256dbd261557389919e36d17d3296925 Mon Sep 17 00:00:00 2001 From: Peter Molnar Date: Thu, 7 Nov 2013 09:27:47 +0000 Subject: [PATCH] instant 404 for 404 pages --- wp-ffpc-acache.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wp-ffpc-acache.php b/wp-ffpc-acache.php index 93a4774..5076f23 100644 --- a/wp-ffpc-acache.php +++ b/wp-ffpc-acache.php @@ -253,8 +253,13 @@ function wp_ffpc_callback( $buffer ) { } } - if ( is_404() ) + if ( is_404() ) { $meta['status'] = 404; + header("HTTP/1.1 404 Not Found"); + flush(); + die(); + } + /* redirect page */ if ( $wp_ffpc_redirect != null) @@ -312,4 +317,4 @@ function wp_ffpc_callback( $buffer ) { } /*** END GENERATING CACHE ENTRY ***/ -?> \ No newline at end of file +?>