简体   繁体   中英

IIS 7 IP address forwarding

I want to move some websites from server 1 to server 2.

My clients have A records pointing to the IP address of server 1. Without updating their DNS records, how can I automatically forward request for those domains from server 1 to server 2?

Thanks

Graham

This image is from an article regarding Exchange , but the IIS settings are relevant.

You can redirect at the HTTP level by specifying a URL redirect in IIS's HTTP Redirect settings:-

IIS中的HTTP重定向

However, for this approach to work you will need a new domain for your sites. eg if the A record resolves www.example.com to Server 1 you will need to redirect to another URL (eg www.example.edu ) that already resolves to Server 2 .

Another option is to setup a reverse proxy using IIS on Server 1 :

Today there was a question in the IIS.net Forums asking how to expose two different Internet sites from another site making them look like if they were subdirectories in the main site.

So for example the goal was to have a site: www.site.com expose a www.site.com/company1 and a www.site.com/company2 and have the content from www.company1.com served for the first one and www.company2.com served in the second one

So slightly different requirements (the article only wants a subdirectory rather than the whole site), but the same concept will apply.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM