CGI: set up goto hook so that /ikiwiki.cgi?do=goto can be an Apache ErrorDocument
parent
8322b8c9c8
commit
170b86a2ef
|
@ -403,7 +403,14 @@ sub cgi (;$$) {
|
||||||
# commenter are for compatibility with any saved URLs
|
# commenter are for compatibility with any saved URLs
|
||||||
if ($do eq 'goto' || $do eq 'recentchanges_link' ||
|
if ($do eq 'goto' || $do eq 'recentchanges_link' ||
|
||||||
$do eq 'commenter') {
|
$do eq 'commenter') {
|
||||||
cgi_goto($q);
|
my $page = undef;
|
||||||
|
|
||||||
|
if ($ENV{REDIRECT_STATUS} eq '404') {
|
||||||
|
$page = cgi_page_from_404($ENV{REDIRECT_URL},
|
||||||
|
$config{url}, $config{usedirs});
|
||||||
|
}
|
||||||
|
|
||||||
|
cgi_goto($q, $page);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Need to lock the wiki before getting a session.
|
# Need to lock the wiki before getting a session.
|
||||||
|
|
Loading…
Reference in New Issue