Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to capture Error Code: 500

Status
Not open for further replies.

BunBo900

MIS
Dec 11, 2009
50
US
Hi,

My site has a link to an external site that required to select correct certificate # to access. If users accidentally select a wrong certificate # code, it returns an error page (Error Code: 500 Internal Server Error).

I would like to do is capture that (error code: 500) then redirect to a customize page that reside on my server
with specific instructions on the page.

Any advice is appreciated.

Thanks.
 
Use the xmlHTTPRequest object.

request.status will contain the response code.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Hi

Certainly [tt]XMLHttpRequest[/tt] sounds like a solution, but where could that be used ?

As the OP wrote there is one page which links to another page. The first is left and the second is not reached. So the JavaScript could be eventually put on the web server's error document 500 page. But if already customizing the error document 500, why to involve JavaScript and another page ?

Anyway, if the server responds 500 Internal Server Error to a certificate error, I would say the server should be configured. 401 Unauthorized would be a more reasonable response.


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top