httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schermuly-Koch, Achim" <a.schermuly-k...@cassini.de>
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
</Location>

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
message.

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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message