title: IIS Reverse proxy configuration for multiple servers
body: <p>I'm new to this IIS configuration, So my requirement is to perform reverse proxy based on the URL's Contents, The below is a brief explanation about what I'm trying to achieve,</p>
  
  <p>We've 3 Servers say,</p>
  
  <ol>
  <li><strong>Public Server</strong> : public.abc.com</li>
  <li><strong>Intranet Web Server</strong>: WebServer.xyz.com</li>
  <li><strong>Intranet API Server</strong>: APIServer.def.com</li>
  </ol>
  
  <p>So whenever a request hits the <em>Public server</em> (i.e. public.abc.com) and the request is like "public.abc.com/?1257#/test" then it should be directed to <em>Intranet Web Server</em> (i.e. WebServer.xyz.com) along with the query string part</p>
  
  <p>Whereas if the request to the <em>public server</em> is like "public.abc.com/api/valid" then the request should be directed to <em>Intranet API Server</em> (i.e. APIServer.def.com) along with the "/api/valid" part,</p>
  
  <p>I tried configuring this using ARR and URL Rewrite in IIS 8.5, by writing 2 different Rules with <em>patterns</em> as "(.<em>)\?(.</em>)" and  "(.<em>)(api)(.</em>)" respectively for the Web Server and the API server,</p>
  
  <p>But it seems like the configuration is working only when either of the rules are disabled and it is doing the intended flawlessly,
  When both the rules are enabled the rerouting is failed and I see a default IIS start page,</p>
  
  <p>I also tried using conditions in the URL rewrite, but it isn't working</p>
  
  <p>Kindly help me for resolving this,</p>
  
  <p>Thanks &amp; Regards,
  B</p>