NetCache supports one proprietary error code (510), plus 11 additional codes that build on standard HTTP 1.1 error codes (200, 201, 302, 400, 401, 403, 407, 412, 500, 502, and 504).
The text for each error code is stored in a file that begins with the number of the error code and ends with the extension ".htm." For example, the error message text for code 501 resides in 501.htm.
The following table shows the default error message text for the 12 error codes that NetCache supports. Each message can be modified by editing the HTML file associated with its error code. See <!--NETCACHE ERROR--> error tag for a definition of <! --NETCACHE ERROR-->.
The <!--NETCACHE ERROR--> error tag, which appears in most of the default error messages, is a proprietary variable that responds to the current error code by displaying the specific text string stored for that error code in the errors.desc file. For example, code 400 returns "Bad URL," whereas code 504 returns "Server unreachable."
You can change the output strings that the <!--NETCACHE ERROR--> error tag returns by editing errors.desc. The errors.desc file is a plain ASCII file similar to the numbered HTML files that store error message text for HTTP 1.1 error codes. The errors.desc file is listed in the Current Error Files list on the Data tab > Software > Error Pages page in the Appliance Manager. Message text in the errors.desc file overrides the default message text that NetCache provides.
Note
Everything between (and including) the angle brackets in the <!--NETCACHE ERROR--> error tag must be inserted into the appropriate error message text file intact and unchanged. Those strings will be converted to instance-specific text output when the error message is displayed.
You can insert one or more of the error tags shown in the following table into your error messages to supply instance-specific information when an error message is displayed.
For example, you can have NetCache respond to a failed page request by displaying the name of the blocked URL, the IP address of the client that made the request, and the date the failure occurred.
When the error message is displayed, each string is replaced with the current value of the variable. For example, the message
"Your request for <!--NETCACHE:URL--> has been denied." might be displayed as "Your request for http://www.anysite.com has been denied."
Note
Everything between (and including) the angle brackets in the error tags must be inserted into the appropriate error message text file intact and unchanged. Those strings will be converted to instance-specific text output when the error message is displayed. The only error tag for which you can edit the output strings is the <!--NETCACHE ERROR--> error tag.
The following example illustrates the proper use of error tags in an error message text file.
<HTML>
<HEAD><TITLE>403 Forbidden</TITLE></HEAD>
<BODY>
<H1>Forbidden</H1>
<H4>
You were denied access because:<P>
<!--NETCACHE ERROR--><P>
DATE:<!--NETCACHE:DATE--><P>
URL:<!--NETCACHE:URL--><P>
USERNAME:<!--NETCACHE:USERNAME--><P>
CLIENT_IP:<!--NETCACHE:CLIENT_IP--><P>
CATEGORY:<!--NETCACHE:CATEGORY--><P>
<H4>
<HR>
</BODY>
</HTML>
Viewed within a Web browser, the preceding HTML file produces the following output.
Copyright © 1994-2002, Network Appliance, Inc. All rights
reserved.
Part No. 210-00317
File: error4.htm
Last updated: 11/12/02 16:57:03