Click to See Complete Forum and Search --> : Detect HTTP response code


-asx-
10-21-2009, 04:46 PM
Is there any way to capture the HTTP response code sent to the browser?

On one of our sites, we use a custom error page that displays a custom message for 401, 403, and 404 errors. I'd like to be able to capture the HTTP status code and display it on the error page, but cannot find the right code to do it.

Any help would be appreciated!

-asx-
12-10-2009, 11:24 AM
Wondering if anyone reading the site today might have an answer to this question.

Is there any way to capture the HTTP response code that was fired when a page was served? We have a custom 404 page that comes up when users get a 401, 403, or 404 error. As you know, there are many sub-error types within each of these general errors. For example, 403.14 - Directory Listing Denied.

I would like to be able to write code to branch the response of the page differently depending on the type of error the user encountered, but have not been able to figure out how to capture the HTTP response code.