Hello
I wonder if any of you can help me please, I'm running a web server on IIS and have a dynamic IP address.
Domain names are forwarded to link to where the following code lives and its supposed to forward users to my server depending on the URL they typed (this way I can map all domains to the same site), and in theory the following Javascript would redirect to the correct address.
I have tried the following but cannot get it to work, any chance of some help please. (by the way I also tried document.referrer, document.location & URL in a similar context to the following code but all I get is the top level domain no matter what is typed)
Heres the code:
function redirect()
{
var x;
x = "80.0.182.0";
if (location.href ="{location.href=" + x + "/";}
else if (location.href="{location.href=" + x + "/site2/";}
else if (location.href="{location.href=" + x + "/site3/";}
}
Thanks in advance for your help
Regards
Sc0rp9
I wonder if any of you can help me please, I'm running a web server on IIS and have a dynamic IP address.
Domain names are forwarded to link to where the following code lives and its supposed to forward users to my server depending on the URL they typed (this way I can map all domains to the same site), and in theory the following Javascript would redirect to the correct address.
I have tried the following but cannot get it to work, any chance of some help please. (by the way I also tried document.referrer, document.location & URL in a similar context to the following code but all I get is the top level domain no matter what is typed)
Heres the code:
function redirect()
{
var x;
x = "80.0.182.0";
if (location.href ="{location.href=" + x + "/";}
else if (location.href="{location.href=" + x + "/site2/";}
else if (location.href="{location.href=" + x + "/site3/";}
}
Thanks in advance for your help
Regards
Sc0rp9