NET网站通过web.config 实现http跳转到https
代码如下:
<system.webServer>
<rewrite>
<rules>
<rule name="http_toHttps" stopProcessing="true">
<match url="(.*)"/>
<conditions>
<add ignoreCase="true" input="{HTTPS}" pattern="off"/>
</conditions>
<action redirectType="Permanent" type="Redirect" url="https://{HTTP_HOST}/{R:1}"/>
</rule>
</rules>
</rewrite>
</system.webServer>
© 版权声明
文章版权归作者所有,转载请预留文章地址。s.wbsun.net
THE END
暂无评论内容