魔法森林官网,国家专利查询网,曹操与蔡文姬主题曲
iis 里 安装好 ssl 证书后,如何实现 在浏览器里录入 http://www.xxx.com,会自动跳转到 https://www.xxx.com 呢。
首先,下载并安装 iis 扩展: url重写(url rewrite)扩展
url重写扩展下载地址: https://www.iis.net/downloads/microsoft/url-rewrite
其次,修改 web.config 文件:
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webserver> <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> </system.webserver> </configuration>
最后,重启网站 或重启 iis。在浏览器里录入:http://www.xxx.com,会自动跳转到 https://www.xxx.com
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Net Core Web Api项目与在NginX下发布的方法
asp.net core3.1 引用的元包dll版本兼容性问题解决方案
IdentityServer4实现.Net Core API接口权限认证(快速入门)
ASP.NET Core MVC通过IViewLocationExpander扩展视图搜索路径的实现
网友评论