aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/404_plugin_and_lighttpd.mdwn
diff options
context:
space:
mode:
authorhttp://cdombroski.myopenid.com/ <http://cdombroski.myopenid.com/@web>2010-03-03 00:14:47 +0000
committerJoey Hess <joey@finch.kitenet.net>2010-03-03 00:14:47 +0000
commit4a7fb67ee6c32b1d66e19f345998b98b169100f0 (patch)
tree686c0380a9119691e7304f7cd2f332d78381e1ce /doc/bugs/404_plugin_and_lighttpd.mdwn
parent8b6fb02ab5482c46ea53ee08eff4f8b65ef99a0d (diff)
downloadikiwiki-4a7fb67ee6c32b1d66e19f345998b98b169100f0.tar
ikiwiki-4a7fb67ee6c32b1d66e19f345998b98b169100f0.tar.gz
Posting my change to the 404 module
Diffstat (limited to 'doc/bugs/404_plugin_and_lighttpd.mdwn')
-rw-r--r--doc/bugs/404_plugin_and_lighttpd.mdwn22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/bugs/404_plugin_and_lighttpd.mdwn b/doc/bugs/404_plugin_and_lighttpd.mdwn
index 29ca107dc..ffbad8add 100644
--- a/doc/bugs/404_plugin_and_lighttpd.mdwn
+++ b/doc/bugs/404_plugin_and_lighttpd.mdwn
@@ -11,3 +11,25 @@ This is with lighttpd 1.4.19 on Debian.
> I originally wrote the plugin for Apache; [[weakish]] contributed the
> lighttpd docs and might know more about how to make it work there.
> --[[smcv]]
+
+>> As I said, I got it working for me, but somebody who knows perl should probably look at it with the aim of making it work for everyone.
+>> I considered having lighttpd construct a proper url for the 404 redirect itself, but I don't know if it can do something like that or not.
+>> For what it's worth, here's the change I made to the module:
+
+ sub cgi ($) {
+ my $cgi=shift;
+ if ($ENV{REQUEST_URI} !~ /ikiwiki\.cgi/) {
+ my $page = cgi_page_from_404(
+ Encode::decode_utf8($ENV{SERVER_NAME} . $ENV{REQUEST_URI}),
+ $config{url}, $config{usedirs});
+ IkiWiki::Plugin::goto::cgi_goto($cgi, $page);
+ }
+
+ # 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);
+ # }
+ }