Re: Intercepting Error Responses from a handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-28-04 at 17:54 +0200, Schermuly-Koch, Achim wrote:
> 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@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 
Since you have to write the custom response page anyway, why not have
my-handler return it directly as a response?



---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux