2
我有一個SSL證書,並在我的web.config中設置了一個重寫規則,以將所有流量定向到https。這工作正常(下面的代碼,如果任何人認爲它有用),但是我現在有一個服務,我暴露給我的手機客戶端,我不希望它使用HTTPS。ASP.NET中的SSL規則異常web.config
我可以創建異常嗎?因此,對於任何www.mydomain.com/PhoneService/Seek.svc請求沒有被重新定向到https://www.mydomain.com .....
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
注意:我將它從{PATH_INFO}編輯爲{URL},因爲[更正確](http://msdn.microsoft.com/zh-cn/library/ms524602%28v=VS.90%29。 ASPX)。 – vcsjones 2012-01-12 17:06:50
輝煌,就是我之後的事情。 – Paul 2012-01-12 17:11:47