在中
web.config,在具有的任何其他规则之前添加以下规则
stopProcessing="true"。
<rule name="RedirecttoHTTPS"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> <add input="{URL}" pattern="/$" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> </conditions> <action type="Redirect" url="https://{SERVER_NAME}/{R:1}" redirectType="SeeOther" /></rule>http.createServer(app)如果您想获得* .azurewebsite.net通配符证书,也可以只使用普通版进行生产。
参考文献:
- 如何通过重写在IIS7和Azure中要求SSL
- URL重写模块配置参考



