Index: adminhandler.php
===================================================================
--- adminhandler.php	(revision 2758)
+++ adminhandler.php	(working copy)
@@ -110,7 +110,7 @@
 				}
 				else {
 					// The requested console page doesn't exist
-					header( 'HTTP/1.0 404 Not Found' );
+                    Utils::http_status(404);
 					$this->header();
 					_e( 'Whooops!' );
 					$this->footer();
Index: utils.php
===================================================================
--- utils.php	(revision 2758)
+++ utils.php	(working copy)
@@ -56,6 +56,26 @@
 		header('Location: ' . $url, true, 302);
 	}
 
+    /**
+	 * function http_status
+	 * Sets the HTTP status code
+	 * @param integer $n HTTP Status Code to send.
+     **/
+    public static function http_status($n)
+    {
+        /* Under FastCGI and CGI Modes, you need to use the Status: header to
+         * set the HTTP status code, but in mod_php, you can do it directly.
+         */
+        if (strpos(php_sapi_name(), 'cgi') !== FALSE) {
+            header('Status: '. $n, true, $n);
+        }
+        else if (isset($_SERVER['SERVER_PROTOCOL'])) {
+            header($_SERVER['SERVER_PROTOCOL'] . ' '. $n, true, $n);
+        }
+        else {
+            header('HTTP/1.0 '. $n, true, $n);
+        }
+    }
 	/**
 	 * function atomtime
 	 * Returns RFC-3339 time from a time string or integer timestamp
Index: theme.php
===================================================================
--- theme.php	(revision 2758)
+++ theme.php	(working copy)
@@ -200,7 +200,7 @@
 		elseif ( $posts === false ) {
 			if ($this->template_exists('404')) {
 			$fallback = array( '404' );
-			header( 'HTTP/1.0 404 Not Found' );
+            Utils::http_status(404);
 			// Replace template variables with the 404 rewrite rule
 			$this->request->{URL::get_matched_rule()->name}= false;
 			$this->request->{URL::set_404()->name}= true;
@@ -210,7 +210,7 @@
 				echo '<h2>';
 				 _e( "Whoops! 404. The page you were trying to access is not really there. Please try again." );
 				echo '</h2>';
-				header( 'HTTP/1.0 404 Not Found' );
+                Utils::http_status(404);
 				$this->display('footer');
 				die;
 			}
@@ -486,6 +486,7 @@
 			'404',
 		);
 		$paramarray['user_filters']= $user_filters;
+        Utils::http_status(404);
 		return $this->act_display( $paramarray );
 	}
 
