SSL证书配置参考如下:

http转https实战教程iis7.5

window08 IIS7安装多域名SSL证书绑定443端口

关键是修改C:\Windows\System32\inetsrv\config\applicationHost.config配置在443后面加上指定的域名

http跳转https,参考如下:

https://www.cnblogs.com/wer-ltm/p/10190535.html

https://www.cnblogs.com/xiaohi/p/8038042.html

关键代码:

<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>

如果一个站点绑定多个域名(未必是子域名):

a.domain.com

b.domain.com

c.domain.com

我们只需要子域名a跳转,参考如下:

IIS rewrite rule to redirect specific domain url to different url on same domain

则配置如下:

<rewrite>
<rules>
<rule name="redirect" enabled="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
<add input="{HTTP_HOST}" pattern="^a\.domain\.com$" />
</conditions>
<action type="Redirect" url="https://a.domain.com/{R:1}" appendQueryString="true" redirectType="Permanent" />
</rule>
</rules>
</rewrite>

IIS配置不带www跳转到www,参考如下:IIS7设置将域名不带www跳转到带www上

主要配置如下:

        <rewrite>
<rules>
<rule name="www" stopProcessing="true">
<match url="^(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(domain\.com)(:80)?" />
</conditions>
<action type="Redirect" url="http://www.domain.com/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>

IIS7多站点ssl配置及http自动跳转到https的更多相关文章

  1. nginx配置http访问自动跳转到https

    1.按照如下格式修改nginx.conf 配置文件,80端口会自动转给443端口,这样就强制使用SSL证书加密了.访问http的时候会自动跳转到https上面 server { listen ; se ...

  2. MVC图片上传详解 IIS (安装SSL证书后) 实现 HTTP 自动跳转到 HTTPS C#中Enum用法小结 表达式目录树 “村长”教你测试用例 引用provinces.js的三级联动

    MVC图片上传详解   MVC图片上传--控制器方法 新建一个控制器命名为File,定义一个Img方法 [HttpPost]public ActionResult Img(HttpPostedFile ...

  3. http跳转https方法:百度云如何让http自动跳转到https【免费SSL证书使用FAQ】

    之前的一篇文章已经给大家提供了免费SSL证书的申请方法,这一篇文章是告诉大家在使用免费的SSL证书时可能会遇到的问题[怎么让http自动跳转到https以及http与https同时使用]的解决方法. ...

  4. IIS (安装SSL证书后) 实现 HTTP 自动跳转到 HTTPS

    IIS 里 安装好 SSL 证书后,如何实现 在浏览器里录入 http://www.xxx.com,会自动跳转到 https://www.xxx.com 呢. 首先,下载并安装 IIS 扩展: URL ...

  5. apache如何设置http自动跳转到https

    如何设置http自动跳转到https?apache环境下,配置好https后,需要设置url重定向规则,使网站页面的http访问都自动转到https访问. 1.先打开url重定向支持1)打开Apach ...

  6. 今天这篇内容分享Apache由http自动跳转到https的多种方法

    本文主要和大家分享Apache http自动跳转到https的几种方法,非常不错,具有参考借鉴价值,需要的朋友参考下 本文主要和大家分享Apache http自动跳转到https的几种方法,当你的站点 ...

  7. [Chrome] chrome 自动跳转到https

    关键字眼: - static_upgrade_mode: FORCE_HTTPS - You cannot visit www.xxx.dev right now because the websit ...

  8. Tomcat配置https及访问http自动跳转至https

    https介绍:   HTTPS(全称:Hypertext Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单讲是HTTP的安全 ...

  9. Tomcat配置SSL后使用HTTP后跳转到HTTPS

    Tomcat配置好SSL后将HTTP请求自动转到HTTPS需要在TOMCAT/conf/web.xml的未尾加入以下配置: <login-config> <!-- Authoriza ...

随机推荐

  1. Twilio收发短信笔记

    twlio基本使用 Twilio是一个做成开放插件的电话跟踪服务(call-tracking service),可用来进行短信,图片等信息的集中于转发,貌似只支持北美地区的电话. 现有一个需求是:客户 ...

  2. typescript 创建二维数组

    private mouseView: Mouse private mouseArray: Array<Array<any>> = new Array<Array<a ...

  3. UBUNTU 15.10 CAFFE安装教程(测试可用)

    转帖:https://github.com/BVLC/caffe/wiki/Ubuntu-15.10-Installation-Guide Ubuntu 15.10 have been release ...

  4. postgresql-基础-1

    概述 层状关系 网状关系 关系型数据库 关系型数据库 ​ 元祖:代表一行 ​ 属性:代表一列 ​ 主码:唯一确定一个元组的属性组,即主键 ​ 域:属性的取值范围 ​ 分量:元组中的一个属性值,即某一行 ...

  5. vue绑定样式

    使用三目运算符绑定样式 本来以为使用vue模版写法,在绑定单个样式,也就是一个class类名的时候可以直接书写,就像这样 <div id="app"> <div ...

  6. TCP->IP输出 之 ip_queue_xmit、ip_build_and_send_pkt、ip_send_unicast_reply

    概述 ip_queue_xmit是ip层提供给tcp层发送回调,大多数tcp发送都会使用这个回调,tcp层使用tcp_transmit_skb封装了tcp头之后,调用该函数,该函数提供了路由查找校验. ...

  7. koa 项目实战(四)注册接口和调试工具(postman)

    1.安装模块 npm install koa-bodyparser --save npm install bcryptjs --save 2.引入模块 根目录/app.js const bodyPar ...

  8. LC 683. K Empty Slots 【lock,hard】

    There is a garden with N slots. In each slot, there is a flower. The N flowers will bloom one by one ...

  9. SQLServer-设置-Table:阻止保存要求重新创建表的更改

    ylbtech-SQLServer-设置-Table:阻止保存要求重新创建表的更改 1.返回顶部 ·不允许保存更改,阻止保存要求重新创建表的更改 · 2.返回顶部 · https://jingyan. ...

  10. 解决 ElementTree 无法处理中文

    解决 ElementTree 无法处理中文,UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 76-99: o ...