iTP Secure WebServer System Administrator's Guide (iTPWebSvr 6.0+)
Configuring the iTP Secure WebServer
iTP Secure WebServer System Administrator’s Guide—523346-002
7-45
Customizing Server Error Messages
Customizing Server Error Messages
This section tells you how to customize the default text of the server-access error
messages. You can customize these messages to include more explanation, to use a
different language, or to suggest a corrective action.
The server comes with a default message for each of the access errors listed in
Table A-4, Server Access Errors, on page A-29. The text of these messages is
encoded in HTML and is presented to the user whenever access errors occur.
For example, the following message (in HTML format) is displayed to the user who
attempts to access an object for which he or she lacks the correct permission:
<TITLE>Forbidden</TITLE><H1>Forbidden</H1>
You do not have permission to get the requested object.
To change the text of this or any of the other access error messages, you use the
following Message configuration directive:
Message id text
where:
id
is the message identifier (see Table A-4, Server Access Errors, on page A-29).
text
is the HTML encoding of the message. You must use curly braces ({}) to enclose
messages that include spaces or that span more than one line.
The Message directive causes the server to return text whenever the error condition
specified by id occurs.
For example, you might use the Message directive to customize the
error-forbidden message to read as follows:
Message error-forbidden {
<TITLE>Forbidden</TITLE><H1>Forbidden</H1>
You do not have permission to get the requested object.<P>
For access information, contact <B>webmaster@widgets.com.</B>
<P><HR><ADDRESS>Widgets International, Inc.</ADDRESS>
}
Or, you might customize the error-short-redirect message to read as follows:
Message error-short-redirect {
<TITLE>Redirection</TITLE><H1>Redirection</H1>
This document can be found <A HREF="$url">elsewhere.</A>
<P>Your browser does not properly support long URLs.
}
In this example, the server replaces $url with the redirection URL.