IIS https https

我正在尝试使用IIS重写模块将httpsredirect到另一个https。

这是我曾经试过的:

testing1:

<rewrite> <rules> <rule name="Redirect Maps Rule" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{StaticRedirects:{PATH_INFO}}" pattern="(.+)" /> </conditions> <action type="Redirect" url="{C:1}" appendQueryString="True" redirectType="Permanent" /> </rule> </rules> <rewriteMaps> <rewriteMap name="StaticRedirects"> <add key="https://sub.olddomain.com/sitename" value="https://sub.newdomwain.co.uk/sitename" /> </rewriteMap> </rewriteMaps> </rewrite> 

testing2:

 <rule name="https test" stopProcessing="true"> <match url=".*" /> <conditions logicalGrouping="MatchAny"> <add input="{URL}" pattern="https://sub.olddomain.com/sitenam$" /> </conditions> <action type="Redirect" appendQueryString="false" url="https://sub.newdomain.co.uk/sitename" redirectType="Permanent" /> </rule> 

既没有工作,我目前使用IIS重写HTTP到HTTPS和HTTP到HTTP这两个工作正常,所以不知道我在这里得到了什么错误。 两个站点都使用相同的通配符SSL证书和相同的IP。

IIS版本7.5