回复 1# shillan
目标服务器:targetServer配置反向代理的服务器:reveseProxServer iis应该是iis7及以上版本,才可以。 1、确定最终访问的网址:比如www.baidu.com 、www.jb51.net等等。 当然你也可以自己在targetServer部署自己的程序,在此为了示范,我在targetServer上部署了2个,用的8088端口,程序分别是: http://targetServer:8088/Auditsys/Default.htm http://targetServer:8088/GCustomer/Login.htm 如图:  2、下面的操作均在在reveseProxServer上执行。 3、安装IIS。 4、安装ARR,下载地址(http://www.iis.net/downloads/microsoft/application-request-routing) 5、新建一个网站 我的示例YIWeb,端口是8080) http://reveseProxServer:8080  5、启用Proxy 

6、添加URL重写规则 
然后添加一个空白规则: 


保存这个规则,ok了! 7、试试效果 

8、总结: 上面的 ^(.*) 、 ^192.168.3.73:8080$ 、http://targetserver:8088/{R:1} 表示:用192.168.3.73:8080替换http://targetserver:8088/, {R:1}就表示^(.*),意思是“http://targetserver:8088/”后面匹配任何字符 eg:访问192.168.3.73:8080/test/index.htm 这个url就被重写成了http://targetserver:8088/test/index.htm |