From 086615eb71cdf51d0601eb9164cfa853e76a7c2c Mon Sep 17 00:00:00 2001 From: Yorhel Date: Wed, 18 Jul 2012 10:36:25 +0200 Subject: [PATCH] Friendlier 404 error --- www/index.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/www/index.pl b/www/index.pl index 4368211..37bf25c 100755 --- a/www/index.pl +++ b/www/index.pl @@ -34,6 +34,15 @@ TUWF::set( } 1; }, + error_404_handler => sub { + my $self = shift; + $self->resStatus(404); + my $title = 'No manual entry for '.$self->reqPath; + $self->htmlHeader(title => $title); + h1 $title; + txt 'That is, the page you were looking for doesn\'t exist.'; + $self->htmlFooter; + }, );