Commit 9bd920de authored by Dries's avatar Dries

* Added the foundations to create customized error pages.

  http://beta.drop.org/foobar.php
  (The customized error pages need to be beautified.)
parent 581e5190
#
# drop.org apache configuration
#
# Archive feature:
#<Files archive>
# ForceType application/x-httpd-php
#</Files>
# Customized server error messages:
ErrorDocument 400 /error.php
ErrorDocument 402 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
ErrorDocument 500 /error.php
<?
# Future improvements:
# --------------------
# 1. Automatically report all errors by e-mail.
# 2. Keep a list of all errors either on file or in a MySQL table.
# 3. Auto-redirect visitor to main page within x seconds.
?>
<H1>Oops, an error occured!</H1>
<PRE>
<B>Temporary debug output:</B><BR>
* STATUS...: <? echo $REDIRECT_STATUS; ?><BR>
* URL......: <? echo $REDIRECT_URL; ?><BR>
* METHDOD..: <? echo $REQUEST_METHOD; ?><BR>
<?
switch($REDIRECT_STATUS) {
case 500:
$message = "500 error - internal server error";
break;
case 404:
$message = "404 error - document not found";
break;
case 403:
$message = "403 error - access denied - forbidden";
break;
case 401:
$message = "401 error - authorization required";
break;
case 401:
$message = "400 error - bad request";
break;
default:
$message = "unknown error";
}
?>
<B>Processed output:</B><BR>
* <? echo $message; ?><BR>
</PRE>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment