Article ID: 3409, created on Nov 30, 2007, last review on May 10, 2014

  • Applies to:
  • H-Sphere

Resolution

Use this utility to define what will be done if a requested page on your site is missing or fails to open for any other reason. In order to specify your own ErrorDocuments, you need to be slightly familiar with the server returned error codes:

Successful Client Requests

200   OK
201   Created
202   Accepted
203   Non-Authorative Information
204   No Content
205   Reset Content
206   Partial Content

Client Request Redirected

300   Multiple Choices
301   Moved Permanently
302   Moved Temporarily
303   See Other
304   Not Modified
305   Use Proxy

     Client Request Errors

400   Bad Request
401   Authorization Required
402   Payment Required (not used yet)
403   Forbidden
404   Not Found
405   Method Not Allowed
406   Not Acceptable (encoding)
407   Proxy Authentication Required
408   Request Timed Out
409   Conflicting Request
410   Gone
411   Content Length Required
412   Precondition Failed
413   Request Entity Too Long
414   Request URI Too Long
415   Unsupported Media Type

     Server Errors

500   Internal Server Error
501   Not Implemented
502   Bad Gateway
503   Service Unavailable
504   Gateway Timeout
505   HTTP Version Not Supported

To configure Error Pages, do the following:

  1. Select Quick Access in the Account menu.
  2. Click the Web Options icon on the page that shows.
  3. Click the Edit icon next to the domain you need.
  4. On the Web Service page, scroll down to find the Error option and click the Add icon on its right.
  5. In the form that appears, enter the error document settings:

For Unix accounts:

  • Error Document Code: choose the one you need from the drop-down box.
  • Message or URL: the path to the page with ERROR message
    IMPORTANT: if ErrorDocument 401 is chosen in Error Document Code, the path must be relative to the local user's site home root
  • Type: Specify if the text in the previous field must be treated as a URL (Redirect) or as a text message (Message).

For Windows accounts
Users will get a slightly different form to enter the path to the custom error page.
* Note that the path should be relative to the home directory, not to the virtual host directory.

If you check "FILE":
- only static error page files can be used;
- the same error page files for this domain can be shared with other account domains.
For instance, with the following file path, all account domains will share this error page: pages\404_error.html
- use the "\" character as a delimiter in the file path;
- do not start the file path with "\".

If you check "URL":
- it will allow you to use scripts (php/ASP) to dynamically generate error pages (alternatively, use static error page files for each type of error page);
- error page files for this domain can't be shared with other domains;
- "Path to Custom Error page" must be relative to the virtual host and start with "/".

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF