Windows Server 2008 IIS7 HTTP重定向HTTPS
1.下载URL重写模块:
2.打开IIS信息服务管理器,选中站点找到SSL设置取消【要求SSL】
3.复制下面代码到站点的web.config文件的configuration节点中
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<system.webServer> <rewrite> <rules> <rule name="HTTP to HTTPS redirect" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" /> </rule> </rules> </rewrite> </system.webServer> |
如果您对C#游戏开发感兴趣,可以扫下面二维码加入我们的QQ群来一起学习交流
原创文章,转载请注明本文链接地址(违者必究):Windows Server 2008 IIS7 HTTP重定向HTTPS