404 header gone from /page-not-found

Permalink
Hello

I have used the file site_theme_paths.php to add a custom 404 page. Like so;

$v = View::getInstance();
$v->setThemeByPath('/page_not_found', "themenamehere");


Now I get a 200 on all page not founds, apart from onwww.www.site.com/index.php?cID=107...

107 is the cID was the single page for /page-not-found, this gives a 404

How can I fix this?

Thanks

yolk
 
ScottSandbakken replied on at Permalink Best Answer Reply
ScottSandbakken
Concrete5's 404 page has always sent a 200 header.

To get a 404 header add this
<?php header("HTTP/1.0 404 Not Found"); ?>
directly beneath
<?php defined('C5_EXECUTE') or die("Access Denied."); ?>