You are here

function boost_fast404 in Boost 6

Send out a fast 404 and exit.

1 call to boost_fast404()
boost_init in ./boost.module
Implementation of hook_init(). Performs page setup tasks if page not cached.

File

./boost.module, line 428
Provides static file caching for Drupal text output. Pages, Feeds, ect...

Code

function boost_fast404() {
  global $base_path;
  if (!headers_sent()) {
    header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
  }
  print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";
  print '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">';
  print '<head><title>' . t('404 Not Found') . '</title></head>';
  print '<body><h1>' . t('Not Found') . '</h1>';
  print '<p>' . t('The requested URL was not found on this server.') . '</p>';
  print '<p><a href="' . $base_path . '">' . t('Home') . '</a></p>';
  print '</body></html>';
  exit;
}