惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
B
Blog
V
V2EX
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
博客园 - 聂微东
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
J
Java Code Geeks
H
Help Net Security
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
D
Docker
L
LangChain Blog
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
WordPress大学
WordPress大学
V
Visual Studio Blog

博客园 - 大豆男生

C# 和 OpenResty 中进行 CRC32 Linq分组后,再对分组后的每组数据进行排序,获取每组的第一条记录 WebClient 指定安全协议(Tls1.1,Tls1.2,Tls1.3) .Net Core 中的 MurmurHash VS2019 .Net Core 3.0 Web 项目启用动态编译 IIS 上部署 ASP.NET Core 应用程序 使用浏览器自定义协议启动本地程序(.EXE文件) 再谈 C# 对象二进制序列化,序列化并进行 AES 加密 腾讯防水墙(滑动验证码)的简单使用 https://007.qq.com C# 使用 PerformanceCounter 获取 CPU 和 硬盘的使用率 .Net 控制台中文(简体/繁体)乱码问题 .Net Core 使用 System.Drawing.Common 部署到CentOS上遇到的问题 .Net Core 读取配置文件 appsettings.json JavaScript 获取按键,并屏蔽系统 Window 事件 frp 初探 nginx 禁止未绑定的域名访问 .NET MVC JSON JavaScriptSerializer 字符串的长度超过 maxJsonLength 值问题的解决 async,await,Task 的一些用法 Newtonsoft.Json(Json.net) 的使用
IIS (安装SSL证书后) 实现 HTTP 自动跳转到 HTTPS
大豆男生 · 2019-01-10 · via 博客园 - 大豆男生

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