Proxy response on status codes

Topics: Developer Forum
Dec 9, 2010 at 12:24 PM
Edited Dec 9, 2010 at 12:25 PM


I have searched for too long time on the net and finally decided to ask here as I am using the Rewriter for proxy business.

Windows Server 2003, IIS 6.0 . latest IIRF

I am proxying a website to hide it from public. People access a subfolder of the main website whoch rewrites the request to the hidden server.
All is well and that part works

Eventually, the load to the remote server we are hiding might get too high and we'll receive a 503 status code. The user will see a service denied from the hidden server.

1) errors from the hidden server shall be covered by our own error pages of the primary site. I found no way yet to obtian the response code, analyse it and redirect/rewrite accordingly when proxing
2) Can I set a timeout in which I will forward to a timeout message sooner than the default 20 seconds when accessing the remote server?

Many thanks for any valuable input.  cannot believe that this is impossible ?


Dec 14, 2010 at 12:00 PM

yes, there's a way to set the timeouts associated to proxied requests.  Check the ProxyTimeouts directive.

Using IIRF to handle the proxying, there's no way to inject your own code to handle 503 response codes, or any other response codes received from a proxy request. If you want to specially handle 503's, or any other code, you'll probably have to write your own DLL.  I don't know of an off-the-shelf product that can do that.

What action did you have in mind, anyway?

good luck.


Dec 28, 2010 at 8:42 AM


thanks for the reply - I had overlooked the timeout parameter and consider it in the future.Not sure though, how I will be passing a 503 to a normal error page of the main site (which is not on 503)


Dec 29, 2010 at 9:01 AM

If you write your own DLL, then you can handle 503 errors for proxied requests, in any way you choose. 

But writing your own DLL may be more commitment than you are interested in making. If that's the case maybe rethink your design.