Originally Posted by evilghost
You may run into some security restrictions on the DOM model but you could try loading your target site into a hidden IFRAME, detect if there's body in the IFRAME, and if not, then keep them on the page else parent.window.location.href redirect them.
Thanks for the help, but the document loaded in the Iframe is from another webserver/domain. I get an access denied error when I try to count the number of body tags in the document.
Is there a way to detect 404 errors in an iframe?