准备工作:
下载URL重写并安装:http://www.microsoft.com/zh-cn/download/details.aspx?id=7435
website绑定443和80;
在web.config文件中添加
<system.webServe>
<rewrite>
<rules>
<rule name="HTTP to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Temporary" />
</rule>
</rules>
</rewrite>
</system.webServer>4.设置URL重写并应用
5.重启IIS服务,测试。
注:工作需要,参考网上博客,手写此文档,日后做学习使用。
本文出自 “Z记录” 博客,请务必保留此出处http://i991019.blog.51cto.com/4174025/1679727
原文:http://i991019.blog.51cto.com/4174025/1679727