error.php 520 Bytes
Newer Older
1
<?php
2
// $Id$
3

4
include_once "includes/common.inc";
Dries's avatar
Dries committed
5

Dries's avatar
Dries committed
6 7 8 9 10 11 12
$errors = array(
  500 => "500 error: internal server error",
  404 => "404 error: '". $_SERVER["REDIRECT_URL"] ."' not found",
  403 => "403 error: access denied - forbidden",
  401 => "401 error: authorization required",
  400 => "400 error: bad request"
);
Dries's avatar
Dries committed
13

Dries's avatar
Dries committed
14 15 16 17
if ($errors[$_SERVER["REDIRECT_STATUS"]]) {
  watchdog("httpd", $errors[$_SERVER["REDIRECT_STATUS"]]);
  header("HTTP/1.0 ". $errors[$_SERVER["REDIRECT_STATUS"]]);
}
18

Dries's avatar
Dries committed
19
include_once("$base_url/index.php");
20
?>