I need to use javasctipt to redirect to a URL
I currently use something like:
<SCRIPT language="JavaScript">
window.location="http://app1.mydomain.com/red";
</SCRIPT>
But now I need the redirect to be smart and go to a different executable based on the host.
Example
red.mydomain.com --> http://app1.mydomain.com/red
blue.mydomain.com --> http://app1.mydomain.com/blue
Further complicating matters I need the parameters to remain in tact.
blue.mydomain.com/?parameter1=abc?paramteter2=123 -->http://app1.mydomain.com/blue/?parameter1=abc?paramteter2=123
How does one "read" the in URL and do a case statement to branch it out?
How does one keep the paramter string so He can pass it in tact?