Knowledgebase: Website Help
Custome error pages using .htaccess
Posted by Bill Kish on 16 January 2005 11:50 AM
Setting up your error documents through the .htaccess file is easier than one might think. Here’s an example of what you would want to cut and paste into your .htaccess file:

ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html

This tells the server that each of these errors pages are in the /errors/ folder and the exact file that needs to be seen when somebody encounters that error.

Each line represents one error. For example, this

ErrorDocument 404 /errors/404.html

is the line for a 404 error, or the message you get when a page can not be found. You can change the path of the file you want the user to go to when they run into the error as well. Just change the “/errors/” to another path like “/static_pages/404.html”

Comments (0)
TotalChoice Hosting, Inc.