option to send 404 header for missing pages

darcs-hash:20051125123614-7ad00-42e0ab6a594e177603175ee37467fc2bdd45d2cb.gz
This commit is contained in:
Andreas Gohr 2005-11-25 13:36:14 +01:00
parent 24bad1d153
commit 2649b1a40f
2 changed files with 6 additions and 0 deletions

View File

@ -80,6 +80,7 @@ $conf['subscribers'] = 0; //enable change notice subscription sup
$conf['pluginmanager'] = 0; //enable automated plugin management (requires plugin)
$conf['compress'] = 1; //Strip whitespaces and comments from Styles and JavaScript? 1|0
$conf['hidepages'] = ''; //Regexp for pages to be skipped from RSS, Search and Recent Changes
$conf['send404'] = 0; //Send a HTTP 404 status for non existing pages?
$conf['rss_type'] = 'rss1'; //type of RSS feed to provide, by default:
// 'rss' - RSS 0.91
// 'rss1' - RSS 1.0

View File

@ -53,6 +53,11 @@
//make infos about the selected page available
$INFO = pageinfo();
//send 404 for missing pages if configured
if($conf['send404'] && !$INFO['exists']){
header('HTTP/1.0 404 Not Found');
}
//prepare breadcrumbs (initialize a static var)
breadcrumbs();