Main Menu
Home
Standard Hosting Package
Extras
Installation
Domain Names
About Dogsbody Hosting
Contact Us
Showcase
Usage Policy
Service Agreement

Customer Menu
Webmail
phpMyAdmin
- - - - - - - - - - - - - - - - - - - - -
Support FAQ

Webmail Login
Username

Password

Your Location Home arrow Support FAQ arrow MySQL arrow How do I customise my '404 page not found' errors?
How do I customise my '404 page not found' errors? Print

As you have probably seen through other faq questions the key to most webpage customisations is with your .htaccess file, here is a simple step by step guide...

Create a directory called 'errorpages' in your 'web' directory (it can be called whatever you want but this name works well as an example).

There are a number of error codes that you can make errorpages for however in practice you only need a few. HTTP status codes are divided into five groups...

  • 1xx: Informational - Request received, continuing process.
  • 2xx: Success - The action was successfully received, understood, and accepted.
  • 3xx: Redirection - Further action must be taken in order to complete the request.
  • 4xx: Client Error - The request contains bad syntax or cannot be fulfilled.
  • 5xx: Server Error - The server failed to fulfill an apparently valid request

...you don't need to create errorpages for any of the 1xx, 2xx or 3xx codes as pages have been returned properly. In practice you should only really need to make pages for the codes...

  • 400 : Bad Request
  • 401 : Unauthorized
  • 403 : Forbidden
  • 404 : Not Found
  • 405 : Method Not Allowed
  • 500 : Internal Server Error
  • 501 : Not Implemented

A full list of codes can be found in RFC 2616 should you wish to investigate.

Create HTML files for each of your errorpages and put in your errorpages directory.

If you haven't already got one create a '.htaccess' file in your web directory and add a line for each errorpage you created such as...

ErrorDocument 400 /errorpages/400.html
ErrorDocument 401 /errorpages/401.html
ErrorDocument 403 /errorpages/403.html
ErrorDocument 404 /errorpages/404.html
ErrorDocument 405 /errorpages/405.html
ErrorDocument 500 /errorpages/500.html
ErrorDocument 501 /errorpages/501.html

...(remember to ftp your .htaccess file as ascii) and you should be done. Try it by calling a page you know doesn't exist.


 

Search This Site

Latest News
BBC News



Copyright © 2003-2008 Dogsbody Hosting