重定向http为https
现在(2019年)绝大部分浏览器的默认连接方式为http,那么我们怎么样才能让别人全部以https连接呢?
本教程环境:
Windows Server系统,IIS服务工具
需要准备的东西:
一个已经支持http和https连接的网站
登陆云服务器,打开IIS管理器
- 选择Url重写功能
- 添加一条空白规则
- 名称随意填写,模式填写: (.*)
- 新增条件,条件输入:{HTTPS},模式:^OFF$
- 操作,重定向URL填写:https://{HTTP_HOST}/{R:1},其他如图
右上角保存规则,那么到这里,所有连接你网站的http请求都会强制变成https,而https请求不会影响,现在更安全啦!
Great internet website! It looks really good! Maintain the good work!
Hey! Someone in my Myspace group shared this site with us
so I came to check it out. I’m definitely enjoying the information. I’m
bookmarking and will be tweeting this to my followers! Exceptional
blog and outstanding style and design.
Thank you for posting. I have the same as you think
The information you have provided in this article is very significant.
Good post. I learn something new and challenging on blogs
I stumbleupon on a daily basis. It will always be useful to read through articles from other writers and use a little something from their web sites.