Redirect to error page when content database of sharepoint is close
===

My requirements is this. I need to redirect my page to the default error page when the content database of sharepoint is offline.

What I did to accomplish my task is to create a httpmodule that will intercept any page that is being requested in the browser. This works fine, if I type in the browser, http://mysite.com/us-en/pages/index.aspx but when I type in the browser http://myste.com, the httpmodule does not intercept it but instead the browser returns,

HTTP/1.1 200 OK
Server: Microsoft-IIS/7.0
Date: Thu, 12 Jul 2012 02:15:30 GMT
Connection: close

Does anyone has an idea, why the browser returns the above text and it not redirect to my custom error page? And why the httpmodule does not intercept it?