Site Penguin
Please Login or Register

Knowledgebase

Custom Error Pages

Although CPanel may provide an option labeled "Custom Error Pages", it seems to save in shtml format (somefile.shtml). There is another way to create custom error pages in the form of editing the .htaccess file:

 

  1. Download/open for editing the .htaccess file
  2. Scroll down to the bottom
  3. Type ErrorDocument 404 /404page.html where 404 is whatever error you want to handle (400, 401, 403, 404, 500), and /404page.html is the document relative to the folder the .htaccess is located in; e.g. if .htaccess is in the public_html folder, then /path/404page.html will refer to the document in public_html/path/404page.html.
  4. If needed, reupload the .htaccess back to the appropriate directory
You are not restricted to html files; you can set a php, htm, html, or shtml file to be the error page.

List of common error codes and their meanings:

  • 400 - Bad Request
  • 401 - Authorization Required
  • 403 - Forbidden
  • 404 - Page/file not found
  • 500 - Internal Server Error

 



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article


Language:

Quick Navigation

Client Login

Email

Password

Remember Me

Search