cunning-fox
09-02-2002, 12:14 AM
Hi,
This script was posted a short while ago on this forum. It simply prevents visitors from visiting a page, if they are visiting it using their host name. Since I'm not going to be able to test this on 2 separate domains, I'm wondering if this syntax would work to allow more than one domain (below 1st script).
<script>
if (location.hostname!="www.geocities.com") {
alert("The site that has linke you to this is not authorized. You now will be forwarded to the original site");
location.replace("index.htm");
}
</script>
<script>
if (location.hostname!="www.paypal.com,www.mydomain.com") {
alert("The site that has linke you to this is not authorized. You now will be forwarded to the original site");
location.replace("index.htm");
}
</script>
Thanks
This script was posted a short while ago on this forum. It simply prevents visitors from visiting a page, if they are visiting it using their host name. Since I'm not going to be able to test this on 2 separate domains, I'm wondering if this syntax would work to allow more than one domain (below 1st script).
<script>
if (location.hostname!="www.geocities.com") {
alert("The site that has linke you to this is not authorized. You now will be forwarded to the original site");
location.replace("index.htm");
}
</script>
<script>
if (location.hostname!="www.paypal.com,www.mydomain.com") {
alert("The site that has linke you to this is not authorized. You now will be forwarded to the original site");
location.replace("index.htm");
}
</script>
Thanks