Redirect based on hostname & port
This is a pretty basic question I expect. Though not being Java developer, I'm at an impass.
I have a small piece of Java code running on a proxy device that runs a basic IF / THEN routine as follows:
if (location.hostname == "testmachine.domain.com")
{
location = ("http://www.newwebpage.com/sorry.html");
}
Very simple stuff. But I'd like to include a port number as well. Essentially I need to combine the above to include a non-standard port like 8500 so that the routine reads:
if (location.hostname == "testfailover.domain.com")
and port number 8500
{
location = ("http://www.newwebpage.com/sorry.html");
}
I cant' get the syntax right. Actually I don't know that it's possible at all. Does anyone have any suggestions or a good reference site that they can suggest? Thanks in advance.

