terry_79 — 2012-08-01T20:01:59-04:00 — #1
How can I redirect (in the backend) a certain URL to a remote target URL and port?
For example, whenever a visitor visits intranet.mysite.com, I want this request to be redirected to an IP address and port 8080. But the important point here is, visitor shouldn't know this.
dklynn — 2012-08-01T23:51:58-04:00 — #2
The REAL important point is that you're attempting to deceive visitors and browsers are designed to prohibit such nefarious activities.
terry_79 — 2012-08-02T06:12:26-04:00 — #3
DK, I am not trying to "deceive" visitors. I am trying to build a "load balancer" where the load will be distributed across different EC2 and cloud servers. This is not going to be a website, instead an application.
dklynn — 2012-08-03T00:26:54-04:00 — #4
In that case, there should be no problem with any redirection, would there?
For "randomized load balancing," the Apache Foundation has this to say (using a RewriteMap). If you look under "Randomized Plain Text," you'll see that the URL changes (as it must) but to separate www1, www2, ... wwwx.
I understand (with your explanation, thank you) but the type of redirection you described would be the kind asked about by noobie hackers, ergo, my comment. Just understand that browser creators will not allow deceptions and mod_rewrite cannot hide an absolute (external) redirection. I'm thankful that they do and applaud their foresight.