Knowledgebase Home | Glossary | Favorites Knowledgebase Home | Glossary | Favorites
Creating customized error pages
Article Details

Last Updated
24th of August, 2010

Level
Intermediate

User Opinions (0 votes)
No users have voted.

How would you rate this answer?
Helpful
Not helpful
Sites hosted on Stackable will display the default error pages if an invalid request is processed by Apache.

To override this behavior, customized error pages can be created which will be delivered in lieu of the Apache defaults.

Note that the following method will not override PHP errors -- only those errors such as 404 which are returned by the Apache process itself.

To begin, create a customized error page and upload it to a site's document root. For example, you might create a file to be displayed in the case of 404 error messages and call it 404.html. A common approach is to upload error pages into a directory under a site-environment's document root, often called error/.

Create an .htaccess file

vi .htaccess

Which contains the following and place it in the site-environment's document root adjusting the path to the custom error file as necessary:

ErrorDocument 404 /error/404.html

Additional ErrorDocument lines corresponding to HTTP error codes can be added to .htaccess as needed.

Learn more about customized error pages
Visitor Comments
No visitor comments posted. Post a comment
Post Comment for "Creating customized error pages"
To post a comment for this article, simply complete the form below. Fields marked with an asterisk are required.
   Your Name:
* Your Comment:
* Enter the code below:
 
Related Articles
No related articles were found.
Attachments
No attachments were found.

Continue