[Squid reverse proxy support - error page rewrites]

Error page rewrites

Since most web servers returns quite crappy error pages and it is often wanted to be able to show a uniform view to the user, trapping error pages in the accelerator and replace the error message with a custom one is very handy.

This is done by detecting HTTP error codes (and Squid error codes) and when detected, request a new error message body from a external URL.

Example:

error_map http://your.web.server/error/404.html 404

This causes 404 errors to be trapped, and the error message from http://your.web.server/error/404.html to be displayed rather than the original error message from the server.

The request sent for the error message is a GET request with the following special HTTP headers:

X-Error-Status:
The received HTTP status code
X-Request-URI
The requested URI

In addition the following client headers are forwarded:

And the following server headers:

The reply send to the client has the HTTP headers of the original error message (except for Content-Length), and a reply body from the specified URL.


Squid Now! Cache Now! Valid HTML 4.0! SourceForge
$Id: errorpages.html,v 1.3 2001/05/19 10:44:03 hno Exp $