You are here

function _minisite_fast_404 in Mini site 7

Return a fast 404 page.

1 call to _minisite_fast_404()
minisite_site_build in ./minisite.module
Build minisite.

File

includes/minisite.site.inc, line 344
minisite.site.inc

Code

function _minisite_fast_404() {
  drupal_add_http_header('Status', '404 Not Found');
  $fast_404_html = variable_get('404_fast_html', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>');

  // Replace @path in the variable with the page path.
  print strtr($fast_404_html, [
    '@path' => check_plain(request_uri()),
  ]);
  exit;
}