ErrorDocument 404 /perl/404-handler #### #!/usr/bin/perl -w use strict; print STDERR join (" ", map "[$_]", scalar localtime, "404 ERROR PERL", map { $ENV{$_} || "-" } qw(REDIRECT_URL REMOTE_HOST HTTP_REFERER)), "\n"; my $red_url = $ENV{REDIRECT_URL} || "?unknown?"; { local $ENV{HOME} = "/home/merlyn/lib/Stonehenge"; require Coy; } my $haiku = Coy::with_haiku("URL $red_url not found"); for ($haiku) { s/&/&/g; s//>/g; s/^\t/    /gm; s/ / /g; s/\n/
/g; } (my $red_html = $red_url) =~ s/[\x00-\x20"<&>"\x80-\xff]/&\#@{[ord$&]}\;/g; my $tp_link = ""; if ($red_url =~ /^\/~/) { for ("http://www.teleport.com/$red_html") { $tp_link = <<"DQ";

Perhaps you were looking for something at Teleport's web-server, such as $_? DQ } } print <<"DQ"; Content-type: text/html Status: 404 Not Found File Not Found

File Not Found

$haiku

The requested URL $red_html was not found on this server. $tp_link

Try looking at the our home page as well. DQ print " " x 512; # stupid IE