Rather than displaying generic messages when an error occurs, you can
provide customized error pages to help your visitors find what they're
looking for. This feature is provided with all FastVirtual web hosting
plans.
If a visitor requests a page that does not exist (perhaps by following
a bad link), instead of the default 404 Not Found message, you can provide
your own error page and direct them to an appropriate page, or provide
an email link so they can inform you of the error.
Examples
-
Default
404 Not Found Page
This is the default 404 Not Found error page displayed by Internet Explorer.
Other browsers display similar pages. The page is effectively a dead-end
and provides no information about the page your visitor was trying to
reach.
- Customized 404 Not Found
Page
This customized 404 Not Found error page invites visitors to notify
us about the problem and offers several links which might help them
get to their intended destination.
- Customized 401 Access
Denied Page
A 401 error is displayed when a visitor provides an incorrect username
or password in a restricted area. Customizing this page is particularly
useful, as it can instruct visitors on how to obtain a password, or
help them recover a forgotten password.
- Customized 403 Forbidden
Page
A 403 error is displayed when a visitor attempts to access a closed
resource. Although similar to the 401 error above, this is displayed
when the resource is not at all publicly accessible; i.e. when a visitor
attempts to browse the "/cgi-bin" directory.
How It's Done
To provide your own custom "404 Not Found" page, simply create a
file named 404.html and place it in your document root ("htdocs") directory.
You can also provide other customized error pages, including 401.html
(access denied), 403 (Forbidden), and 500 (Script Error).
Error pages must be placed in your document root
("htdocs"), and will only function correctly this is not
password-protected.
As the location at which the error page is displayed depends upon
where the error occurs, your pages should only use absolute URLs
(http://www.yourname.com/etc.). Relative URLs will no longer be
correct when your page is called outside of your document root.
Advanced users may wish to use an .htaccess file to specify alternate error handlers.
For further information, please see Apache's
Error Document Directive.
|