Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 for example). I'm trying to do the following: when [www.] is entered the default web site on IIS have to be loaded (this part is ok), but when is entered I want to redirect this request to another web server ( for example). I created a site "test" on IIS and it is displayed when is entered. Then I tried to redirect it with following rule: Requested URL matches the pattern: * (using wildcards) Condition: {HTTP_HOST} matches Action type: Rewrite Rewrite URL:{R:0} but when I try to load now I get IIS's error 404 page. Obviously I'm wrong :-) How can I do such a redirect?

share|improve this question
up vote 4 down vote accepted

A rewrite needs to be a relative path on disk, under the same website. That's what is causing the 404 error in your case.

A redirect will send a client-side redirect, but that won't work since is an internal IP that can't be accessed publicly.

What you need is ARR: It's a reverse proxy and will take the public request and forward it on to the internal server. This is the middle man between the client and the internal server. It leverages IIS and URL Rewrite so you're already much of the way there.

share|improve this answer
Thanks! I'll take a look on this. – Andrew Mar 16 '10 at 7:24
This helped me today - I thought you could rewrite to anything under the same domain (including different subdomains), but it wasn't working! Now am doing relative path, and dropping the subdomain component. Works great. – Matt May 17 '10 at 22:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.