Custom Error Messages
When a user attempts to connect to a Web site and an HTTP error occurs, a generic message is sent back to the client browser with a brief description of what happened during the attempt to establish a connection. For example, if a user attempts to connect to a Web site that has reached its maximum connection capacity, an HTTP error will be returned in the form of an HTML page that contains the statement "Too many users."
You can use the Custom Errors property sheet in HC to customize these generic HTTP errors.
Adding a Custom Error Message
Custom error messages can be in the form of a mapping to a file or to a URL. Either of these can be implemented by using the Custom Errors property sheet in the HC IIS Manager.
To customize an error message by mapping to a file:
Create a file that contains your custom error message and place it in a directory.
Login into Control Panel as Host Admin or Web admin, Click Domains, select the site for which you want to customize the error messages, In the displayed IIS Management Console, click on Properties button at the top of the page.
In the Site Properties sheet, click on Error Messages button present at the bottom, It will take you to Custom Error sheet.
Select the HTTP error that you would like to change.
Click the Edit Properties button.
Select File from the Message Type box.
Type the path and file name which points to your customized error message, or use the Browse button to locate the file on your computer's hard disk.
Click OK.
To customize an error message by mapping to a URL:
Create a file that contains your custom error message and place it in a directory.
Login into Control Panel as Host Admin or Web admin, Click Domains, select the site for which you want to customize the error messages, In the displayed IIS Management Console sheet , click on Properties button at the top of the page.
In the Site Properties sheet, click on Error Messages button present at the bottom, It will take you to Custom Error sheet.
Select the HTTP error that you would like to change.
Click the Edit Properties button.
Select URL from the Message Type box.
Type the URL which points to your customized error message by entering the path to the URL beginning with the virtual directory name.
Click OK.
If you have an ASP file defined to handle a custom error, the script is invoked as a URL which passes context. For example, if you have an .asp file called Handle405.asp which is defined to handle HTTP 405 errors, if a 405 error occurs when a user tries to access Example.htm, then the .asp file will be invoked as if the user had typed http://example.advcomm.com/handle405.asp?405;http://example.advcomm.com/example.htm in the Web browser.
If you are using static custom error files (HTML files), you should always use the File option. If you plan to develop an application (by using ISAPI or ASP) to handle errors, then use the URL option. Note that the error status is handed to the application in the URL parameters and it is the application's responsibility to set the HTTP header status; otherwise, the HTTP response status will be "HTTP 1.1 200 OK."
If you are using Internet Explorer 5.0 with Windows, then Internet Explorer may replace the following custom errors with its own HTTP error. If the file size of the custom error is smaller than the size listed, the custom error will not be used:
403, 405, 410 - must be greater than 256 bytes
400, 404, 406, 408, 409, 500, 500.12, 500.13, 500.15, 501, 505 - must be greater than 512 bytes