IIS 7 URL rewrite rule
- by Andrew
Hello, guys!
We have here to web servers behind a router - one IIS and one Tomcat (on different machines / IP addresses). The domain is pointing to out external IP, which is forwarded to IIS (internal IP 192.168.1.10 for example). I'm trying to do the following: when [www.]ourdomain.com is entered the default web site on IIS have to be loaded (this part is ok), but when test.ourdomain.com is entered I want to redirect this request to another web server (192.168.1.11 for example). I created a site "test" on IIS and it is displayed when test.ourdomain.com is entered. Then I tried to redirect it with following rule:
Requested URL matches the pattern: * (using wildcards)
Condition: {HTTP_HOST} matches test.ourdomain.com
Action type: Rewrite
Rewrite URL: http://192.168.1.11/{R:0}
but when I try to load test.ourdomain.com now I get IIS's error 404 page.
Obviously I'm wrong :-)
How can I do such a redirect?