SUPPORT
 Support
 Shared Web Hosting
 CGI Scripting
 Custom Error Pages
 Password Protection
 E-Mail Services
 PAGE emerge personalised mailshots
 Miscellaneous FAQ
 Outlook Express Setup
SEARCH
{About}
{News}
{Services}
{Solutions}
{Support}
{Contact}
{Search}
Custom Error Pages
  How can I configure custom error pages?  
The default server error pages are somewhat unimaginative, and provide very little help to users other than an error code which they often will not understand. Custom error pages provide a way for you to display rather more useful and interesting pages when an error occurs, such as a user requesting a document which does not exist. The error page could also redirect visitors to the main start page of the site.  
 
Custom error pages are defined by using .htaccess files, which specify the location of the error document for the server to display, and the circumstances under which to display it. The .htaccess file should be a plain text file, which you can create using Notepad on Windows.  
 
Example .htaccess File:  
ErrorDocument 403 /errors/403.html  
ErrorDocument 404 /errors/404.html  
ErrorDocument 500 /errors/500.html  
 
The ErrorDocument directive requires that you specify the error code for which to display the specified error document, and the error document to display. Each situation which causes an error has a corresponding error code. The most common error code is ‘404’ which is ‘Document not found’, this is generated when a client requests a file on the server which does not exist. The third item on each line specifies the document which the server returns when that error occurs. The error code ‘500’ is ‘Internal Server Error’ when something unexpected happens, and ‘403’ is ‘Forbidden’, when a client requests something for which it is not authorised.  
 
If you are already have a .htaccess file with other directives, such as those for password protection, you can add the error document directives before or after the existing configuration data.  
 
Further information on HTTP status codes can be found in the HTTP 1.1 RFC: http://www.ietf.org/rfc/rfc2616.txt  
 
 
 

Hosting services for the discerning customer - see our advert in E-Web magazine  
 
Including.......'Fully managed dedicated server hosting' and 'Server co-location' at our Docklands datacentre, with superfast 100Mb connectivity.  
 
Full security management including updates, SSL and Firewalls.  
 

 

OUT NOW.......  
 
Our latest newsletter. If you would like to receive a copy of our excellent publication which keeps you up to date on our products and services and what is happening in the world of the Internet, please email us from the Contact page and let us know you would like to be added to our mailing list.

Tel: 07968 959764     Fax: 01730 231021     E-mail: info@pagehosting.co.uk
The contents and copy on this site unless otherwise documented, are the sole property of Page Hosting Ltd. All Rights are Reserved.
Page Hosting Ltd. Registered in England. No. 4194856.