Speedsoft Home Page
 
Order Hosting Services Services and Pricing Support Home Page Search Speedsoft Contact Information Site Map
: Custom Error Pages

You can create custom error pages for your web site using an .htaccess file in your web server root directory. Simply create a file named .htaccess (or edit the one that might already be in your root folder) and add the following line to it:

ErrorDocument 404 /errordocs/page_not_found.html

This will cause the page named "page_not_found.html" located in a folder named "errordocs" to be displayed if a visitor to your web site tries to access a page that does not exist.  The three main types of error documents are:

1) Plain Text
ErrorDocument 500 "The server made a boo boo.
 
2) Local Redirects
ErrorDocument 404 /missing.html
(to redirect to local url /missing.html)
ErrorDocument 404 /cgi-bin/missing_handler.pl
(can redirect to a script or a document using server-side-includes.)
 
3) External Redirects
ErrorDocument 402 http://some.other_server.com/subscription_info.html

For more information about this, please see the Apache server documentation at http://httpd.apache.org/docs/mod/core.html#errordocument.
 

Home | Order | Services | Support | CGI Central | E-Commerce | Search | Contact Us | Site Map | Links
Copyright © 1995-2008 Speedsoft, LLC. All rights reserved.