summaryrefslogtreecommitdiff
path: root/doku.php
diff options
context:
space:
mode:
Diffstat (limited to 'doku.php')
-rw-r--r--doku.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/doku.php b/doku.php
index 9ee99353a..c1bfebdc5 100644
--- a/doku.php
+++ b/doku.php
@@ -55,10 +55,10 @@
exit;
}
- //send 404 for missing pages if configured
- if($conf['send404'] &&
- ($ACT == 'show' || substr($ACT,0,7) == 'export_') &&
- !$INFO['exists']){
+ //send 404 for missing pages if configured or ID has special meaning to bots
+ if(!$INFO['exists'] &&
+ ($conf['send404'] || preg_match('/^(robots\.txt|sitemap\.xml(\.gz)?|favicon\.ico|crossdomain\.xml)$/',$ID)) &&
+ ($ACT == 'show' || substr($ACT,0,7) == 'export_') ){
header('HTTP/1.0 404 Not Found');
}