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 IIS snap-in.

To customize an error message by mapping to a file

  1. Create a file that contains your custom error message and place it in a directory.
  2. In the Internet Information Services snap-in, select the Web site, virtual directory, directory, or file in which you would like to customize HTTP errors and then click the Properties button.
  3. Select the Custom Errors property sheet.
  4. Select the HTTP error that you would like to change.
  5. Click the Edit Properties button.
  6. Select File from the Message Type box.
  7. 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.
  8. Click OK.

To customize an error message by mapping to a URL

  1. Create a file that contains your custom error message and place it in a virtual directory.
  2. In the Internet Information Services snap-in, select the Web site, virtual directory, directory, or file in which you would like to customize HTTP errors and then click the Properties button.
  3. Select the Custom Errors property sheet.
  4. Select the HTTP error that you would like to change.
  5. Click the Edit Properties button.
  6. Select URL from the Message Type box.
  7. Type the URL which points to your customized error message by entering the path to the URL beginning with the virtual directory name.
  8. Click OK.

Notes


© 1997-1999 Microsoft Corporation. All rights reserved.