error.php 446 Bytes
Newer Older
Dries's avatar
   
Dries committed
1
<?php
2
// $Id$
Dries's avatar
   
Dries committed
3

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

Dries's avatar
   
Dries committed
6
$errors = array(500 => "500 error: internal server error", 404 => "404 error: `$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
7

Dries's avatar
   
Dries committed
8
watchdog("httpd", $errors[$REDIRECT_STATUS]);
Dries's avatar
Dries committed
9

Dries's avatar
   
Dries committed
10
if (strstr($REDIRECT_URL, "index.php")) {
Dries's avatar
   
Dries committed
11
  drupal_goto("../index.php");
Dries's avatar
   
Dries committed
12
13
}
else {
Dries's avatar
   
Dries committed
14
  drupal_goto("index.php");
Dries's avatar
   
Dries committed
15
}
Dries's avatar
   
Dries committed
16

Dries's avatar
   
Dries committed
17
?>