[WEB4LIB] Re: Changing the default "page not found" page?
Roy Tennant
rtennant at library.berkeley.edu
Thu Aug 26 10:43:33 EDT 1999
And of course the best "page not found" page is none at all. That is,
there are often things you can do to prevent it from happening in the
first place. This is how:
1) Monitor your error log to find out the kinds of errors that are
occurring. Many will be simple spelling or case errors.
2) Write a simple CGI program in your favorite language to do a redirect
if it can detect one of the errors you've identified (doing this in Perl
is wonderful, due to the great string matching capability of Perl).
3) Change your server configuration to execute that program instead of
using the default 404 error message or sending them to a static error
page.
4) Watch your errors go down.
I do this on sunsite.berkeley.edu, and therefore we can handle such bogus
URLs as http://sunsite.berkeley.edu/iNterNetiNdeX/ with aplomb, and if the
person bookmarks the page they will get the "real" URL. This technique
literally saved my tail yesterday when our local paper printed a URL over
two lines and hyphenated the URL. As soon as I discovered it, I went in
and added a couple lines to my 404 error program, and presto-chango, the
bogus URL was no longer bogus. Now *that's* public service.
Roy
More information about the Web4lib
mailing list