X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/3b83e520182a83e4ae6c61ab7b360b0eb939469f..ea4967f184bf0a27eaa2dc81da1084780756156a:/IkiWiki/Plugin/404.pm?ds=inline diff --git a/IkiWiki/Plugin/404.pm b/IkiWiki/Plugin/404.pm index 5550ea7d1..8adfd5dd9 100644 --- a/IkiWiki/Plugin/404.pm +++ b/IkiWiki/Plugin/404.pm @@ -21,6 +21,7 @@ sub getsetup () { # server admin action too safe => 0, rebuild => 0, + section => "web", } } @@ -67,8 +68,10 @@ sub cgi_page_from_404 ($$$) { sub cgi ($) { my $cgi=shift; - if ($ENV{REDIRECT_STATUS} eq '404') { - my $page = cgi_page_from_404($ENV{REDIRECT_URL}, + if (exists $ENV{REDIRECT_STATUS} && + $ENV{REDIRECT_STATUS} eq '404') { + my $page = cgi_page_from_404( + Encode::decode_utf8($ENV{REDIRECT_URL}), $config{url}, $config{usedirs}); IkiWiki::Plugin::goto::cgi_goto($cgi, $page); }