httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schermuly-Koch, Achim" <>
Subject [users@httpd] Intercepting Error Responses from a handler
Date Wed, 28 Apr 2010 15:54:52 GMT
Hi all,

i have an apache setup using a proprietary handler (let's call it "my-handler") to render
the content

<Location "/mypages">
  SetHandler my-handler

This is similar to using a php-script handler, i guess.

Now the handler does some URI resolution magic, thus it might return a 404-not found response.
I would like to intercept these (and 500, 401, etc. as well) and display some custom error

I tried

ErrorDocument 404 /notfound.html

But that does only work for pages not beginning with "/mypages" because apache does not find
them. However, if i request "/mypages/nonexistent.html" which is handled by "my-handler" I
just see a boring 404 rendered by the handler.

Is there any way to intercept this one _easily_? I could imagine, I could set up a proxy -
at least I have found some documentation about intercepting in mod_proxy. But I really like
to keep things simple (and fast).

If mod_proxy would be the only solution, is it possible to set up this "in situ", I mean on
the one and same apache hosting the "my-handler"

Any help appreciated

regards   achim

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message