elisch
asked on
Redirection with error handling
I have two mirrored web servers in different locations with users being directed from a third server. On the third server is a simple script that automatically redirects the user to site 1. I want a script that will check site 1, if its available redirect. If site 1 is not available it needs to automatically redirect to site 2.
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There is one more solution to your problem, which is not reasonably good.
Write <img> tag in the html file, which tries to include an image from server 1, and in its onError attribute, call a javascript function which directs it to server 2.
eg: <img src="http://server1.com/img1.gif" onError="javascript:redire ctToServer 2()">
Write <img> tag in the html file, which tries to include an image from server 1, and in its onError attribute, call a javascript function which directs it to server 2.
eg: <img src="http://server1.com/img1.gif" onError="javascript:redire
ASKER
Very helpful, thank you!!!
ASKER
Thanks,
Eli