cunning-fox
10-03-2002, 11:54 PM
Hi,
I was given this script weeks ago. It checks to make sure that my domain is accessing the site this script is on, and only my site.
It will keep most people off the page that aren't suppose to be there.
The problem is that it doesn't work. Either it doesn't work in "IE" or not at all. Any ideas?
Thanks
<script>
if (location.hostname!="http://www.mysite.com") {
alert("The site that has linked you to this is not authorized.");
location.replace("sorry.html");
}
</script>
I was given this script weeks ago. It checks to make sure that my domain is accessing the site this script is on, and only my site.
It will keep most people off the page that aren't suppose to be there.
The problem is that it doesn't work. Either it doesn't work in "IE" or not at all. Any ideas?
Thanks
<script>
if (location.hostname!="http://www.mysite.com") {
alert("The site that has linked you to this is not authorized.");
location.replace("sorry.html");
}
</script>