}
}
+ $GLOBALS['basename'] = $basename;
+
$html_file = "$basename.html";
$php_file = "$basename.php";
if(!$php_exists && !$html_exists && !$cms_content) {
header('HTTP/1.0 404 File Not Found');
- if(file_exists('404.php') || file_exists('404.html')) {
- run_php('404');
+ if(file_exists('error_404.php') || file_exists('error_404.html')) {
+ $GLOBALS['error_basename'] = $basename;
+ run_php('error_404');
return;
} else {
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>404</title></head><body><h1>404 File Not Found</h1></body></html>';
+ exit();
}
}