我有2个网站运行在一个服务器与2个不同的主机名。 让我们打电话给他们
1 – hostname1.host.com
2 – hostname2.host.com
hostname1.host.com绑定到一个WordPress站点, hostname2.host.com绑定到一个ASP.NET MVC站点。 另外还有两个MVC站点作为QA,分别在端口8000和8008上运行。 这些可以自然地通过主机名或者只是在服务器的IP地址上被访问。
截至昨天,WordPress的网站已经过时了。 我已经绑定了hostname1.host.com到MVC站点,因为这是我想要使用的,并且从WordPress站点的绑定中删除了这个主机名。
我有2个全局的URL重写规则:
第一条规则将除服务器的IP地址之外的所有stream量redirect到hostname1.host.com但端口8080和8008除外。
第二条规则将hostname2.host.com上的所有stream量redirect到hostname1.host.com 。 我也包括这个规则的端口。
然后,在现场MVC网站上,我也有一个规则,redirect所有80端口的stream量到443 :
我遇到的问题是要将WordPress网站绑定到端口8080不工作。 我有:
在我的网站上我有绑定(只要想象下红色说hostname1.host.com):
当我尝试访问任何域上的WordPress站点或端口8080上的IP地址时,会发生什么?我得到redirect:
<h1>Object Moved</h1>This document may be found <a HREF="http://hostname1.host.com/">here</a>
这不应该发生。 不应该有将端口8080redirect到主机名的规则。
我仍然可以访问分期和QA网站就好了。 我甚至尝试用WordPress站点的端口交换QA站点的端口。 然后我可以在端口8080上访问QA站点,但是端口8000redirect到主机名。
从IIS日志中:
有很多这样的:
#Software: Microsoft Internet Information Services 8.5 #Version: 1.0 #Date: 2016-11-24 12:27:57 #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken 2016-11-24 12:27:57 192.168.3.7 GET / - 8080 - 169.1.87.250 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1687 2016-11-24 12:36:09 192.168.3.7 GET /Default/ChurchGroups - 8080 - 169.1.134.14 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1119 2016-11-24 12:36:17 192.168.3.7 GET / - 8080 - 169.1.134.14 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1157 2016-11-24 12:36:23 192.168.3.7 GET / - 8080 - 169.1.134.14 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1171 2016-11-24 12:36:35 192.168.3.7 GET / - 8080 - 169.1.134.14 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1156 2016-11-24 12:36:43 192.168.3.7 GET / - 8080 - 169.1.134.14 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1171 2016-11-24 12:37:06 192.168.3.7 GET / - 8080 - 169.1.134.14 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1147 2016-11-24 12:37:20 192.168.3.7 GET / - 8080 - 169.1.134.14 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1156 2016-11-24 12:37:32 192.168.3.7 GET / - 8080 - 169.1.134.14 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1140 2016-11-24 12:37:39 192.168.3.7 GET / - 8080 - 169.1.134.14 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1171 2016-11-24 12:38:11 192.168.3.7 GET /Default/Schools - 8080 - 169.1.134.14 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1187 2016-11-24 12:38:25 192.168.3.7 GET /Default/Schools - 8080 - 169.1.134.14 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 - 302 0 0 1185
你可以发布IIS日志,当这种情况发生? 这听起来像是有一个地方在一个地方,IIS日志可能包含更多的信息取决于日志logging级别。