1
votes

I am quite new to IIS Web Farms and url rewriting/redirecting.I need my IIS server to redirect an HTTP request to another server if it has some specific subfolder in the url.

I have a domain with domain name; example.com , and it is bound to a Web Application that is running on a machine with IP address 111.111.111.111 .I also have another web application running on a machine with IP address 222.222.222.222. So,what i need is when server receives an HTTP request with a URL that contains a subdirectory named NewApp it shall redirect to the IP address 222.222.222.222.

For example;

If request url is something like example.com/OldApp or example.com then request shall be served by the web application running on machine with IP address 111.111.111.111

if request url starts with example.com/NewApi then request shall be served by the web application running on machine with IP address 222.222.222.222

How can i achieve this by using url rewrite module of IIS?

1
You can search about redirecting subdomains... maybe these links help: forums.iis.net/t/1216172.aspx and brainarama.com/thought/8af37050-9051-11e7-8efa-871c7c192f33/…Dalton Cézane
Sadly, I could not make it work with IIS. I have solved this problem by creating subdomains.NALTUN
It is recommended you put your solution as the answer, so other users with same problem can benefit from it.Dalton Cézane

1 Answers

0
votes

Instead of using subdirectory, I created subdomain as ; newApi.example.com and set DNS records for it. I didn't go with reverse proxy solution.