Individuelle Fehlerseiten für Homepages / Domains
Der Fehlerprozessor CEP der BBoxBBS behandelt die folgenden Fehlercodes: 400, 401, 403, 404, 500 und 501
In Ihrem Homepage- oder Domainverzeichnis legen Sie ein Unterverzeichnis mit
nachstehendem Namen an: #errors
In diesem Unterverzeichnis #errors legen Sie Ihre eigenen Fehlerseiten ab die Sie in HTML erstellt
haben:
- 400.html
- 401.html
- 403.html
- 404.html
- 500.html
- 501.html
Findet es eine Datei nicht wird diese der BBoxBBS angezeigt. Nachstehend
nun ein paar Erläuterungen in englisch sowie alle Variablen die Sie in
Ihren eigenen HTML-Fehlerseiten brauchen können:
As important as the location of custom error documents is the format of these pages.
CEP can handle input files of virtually any size though it will refuse to
process documents larger than 1 MByte. Custom error documents should be plain HTML.
CEP will send them to the client with a content-type of "text/html".
The actual content of an error page should mention the response's status code
and give at least a brief explanation of the error condition:
400 Bad Request
The request could not be understood by the server due to malformed syntax.
401 Not Authorized
User authentication is required, but no acceptable credentials were supplied.
403 Forbidden
The server understood the request, but is configured to refuse fulfilling it.
404 Not Found
The server was not able to locate anything matching the requested resource.
500 Server Error
The server encountered an internal error and was not able to fulfill the request.
501 Not Implemented
The server does not support the functionality required to fulfill the request.
In addition to standard HTML, custom error pages can contain variables that are
replaced with information about the failed transaction before CEP sends the resulting
document to the client. The following variables are available:
%admin% |
The administrator's e-mail address as configured in the server identity's
profile. For example "webmaster@example.com".
|
%args% |
The arguments that were submitted with the request, prepended with a question
mark. For example "?mode=test&what=example".
|
%host% |
The fully qualified domain name of the identity that received the request.
For example "www.example.com".
|
%message% |
The error message generated by the server itself or by a faulting WSAPI
generator. For example "Access to URL / denied".
|
%pass% |
The password that was submitted with the request.
|
%path% |
The absolute url of the requested resource (no host information or arguments
included). For example "/private/index.html".
|
%reason% |
The HTTP status code and reason phrase of the error response. For example
"501 Not Implemented".
|
%referer% |
The address of the resource from which the requested URL was obtained. For
example "http://www.example.com/links.html".
|
%request% |
The raw HTTP request line with method, absolute URL, and protocol version.
For example "GET /private/index.html HTTP/1.1".
|
%root% |
The root URL of the identity that received the request (no path or arguments
included). For example "http://www.example.com/".
|
%status% |
The numerical HTTP status code of the error response (no reason phrase
included). For example "404".
|
%time% |
The current date and time in HTTP header format. For example "Sun, 17
Jun 2001 16:54:21 GMT".
|
%url% |
The URL of the requested resource (no HTTP arguments included). For example:
"http://www.example.com/private/index.html".
|
%usage% |
The total number of errors successfully handled by the CEP error processor
since the server was last started.
|
%user% |
The username that was submitted with the request.
|
%version% |
The version number of the CEP error processor that generated the error
response. For example "CEP 2.1.0 (WSAPI)".
|
By default, variables are encoded for display within an HTML document: Special
characters like "<", "&", and diacritics are converted
to HTML entities like "<", "&", and
"ä". In the majority of cases, this is the desired behaviour.
There are, however, situations where you will want to use a variable as part of
an URL inside an HTML tag for example, when providing a link back to a
referring document. In these cases, the default encoding might break the URL.
Therefore, CEP provides a separate set of URL encoded variables. Each variable
listed in the table above can be accessed in URL encoded format by using
"$" delimiters instead of the standard "%" delimiters. For
example, the URL of the referring document is stored in "$referer$".
So, the code for a properly formatted link back to that document would look like
this:
<A HREF="$referer$">%referer%</A>