I am trying to do something that should be rather simple, but still I can't make it work.
Let's say I have 2 virtual machines on my lan. Those machines are web servers for customer-testing purposes. The old one runs IIS6 and the new one runs IIS7.5
Let's say that I have only one public IP address to use. In the original scenario the public IP was mapped to the old machine, and all was fine.
Now I have the need to "split" this public address between those two machines. What I want to do is, based on the host header, "redirect" or "rewrite" the request to the correct machine.
So far I tried to use the "new" machine with IIS7 as a reverse proxy too, fiddling with ARR and Url Rewrite. I also tried the "Web Farm Framework" in combination with the previous two modules.
Short story: I can't make it work: all the requests are redirected to the "old" machine no matter what.
Long story: I tried to make things as clean as possible. My cleanest attempt was making 2 server farms, the first with the new machine (which is itself) and the second with the old machine.
In my rewrite rules, I put as first rule that anything that matches www1.*.mydomain.com should be routed to webfarm new, and stop processing.
The second rule (which should be checked only if the first one fails) says that anything that matches *.mydomain.com gets routed to webfarm old.
In this scenario, everything gets routed to the old machine. But if I disable the *.mydomain.com rule, the first one actually works. It's like the second rule takes priority if enabled, even if it's under the other one.
If anyone has a solution to this, even a total different approach, you're welcome. I need to split that public IP on those two machines based on host header.
Thanks.