ikiwiki/doc/plugins/404.mdwn

25 lines
1.1 KiB
Plaintext
Raw Normal View History

[[!template id=plugin name=404 author="[[Simon_McVittie|smcv]]"]]
2010-02-12 09:38:00 +01:00
[[!tag type/web]]
This plugin lets you use the IkiWiki CGI script as an Apache 404 handler,
to give the behaviour of various other wiki engines where visiting a
nonexistent page provides you with a link to create it.
2011-06-08 21:17:32 +02:00
To enable the 404 handler you need to:
2011-06-08 21:31:16 +02:00
1. Edit your `.setup` file and add `404` to the `add_plugins` line.
2011-06-08 21:17:32 +02:00
2. Add a 404 error document handler in your Apache configuration:
2009-02-05 21:31:37 +01:00
2011-06-08 21:17:32 +02:00
`ErrorDocument 404 /url/path/to/ikiwiki.cgi`
2009-02-11 07:56:01 +01:00
2011-06-08 21:17:32 +02:00
Where `/url/path/to` is the path portion of the URL to the `ikiwiki.cgi` binary.
This plugin might also be useful on non-Apache web servers, if they provide the
2011-06-04 18:18:31 +02:00
`REDIRECT_STATUS` and `REDIRECT_URL` environment variables to their 404 handlers.
`REDIRECT_STATUS` should be `404` and `REDIRECT_URL` should be the path
part of the URL (for instance it would be `/plugins/404/` if this page was missing).
2009-02-11 07:56:01 +01:00
2011-06-04 18:18:31 +02:00
If you would like help with adapting this plugin for a different web server,
you will need to provide the output of
[[this 404 handler|forum/nginx:_404_plugin_not_working#comment-6b1607f7961d2873517d4780f56ac3ad]].