Server error-handler-404Details » History » Revision 6
« Previous |
| Next »
Sfiera, 2008-11-06 03:57
uri to call if the requested URL results in a static file not being found. It is not invoked if dynamic content, such as a fastcgi script, returns an HTTP 404 status code.
You can use a dynamic or static page for the handler. If you use a static page, the server will return a 404 HTTP status code with the content of your static page. However, if you use a dynamic page, you must set the status code to 404 (or another appropriate error code such as "410 Gone") in the HTTP headers that your dynamic page generates.
Default: not set
server.error-handler-404 = "/error-404.php"
Versions of lighttpd prior to 1.4.17 contained bugs in the implementation of this directive that meant a 404 status code generated from dynamic content was sent to the error handler. This prevented a 404 status code being sent from the error handler itself, which always returned status 200. If you are using an older version, and want to send a 404 status code please use server.errorfile-prefix; however, server.errorfile-prefix does not allow dynamic handlers.
- server.errorfile-prefix option Server.errorfile-prefixDetails
- Spice Up Error Page (Blog) <http://blog.lighttpd.net/articles/2005/08/28/spice-up-for-error-page>
- HTTP 1.1 Status Codes <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html>
Updated by Sfiera over 14 years ago · 6 revisions