IIS7 / IIS7.5 URL 重写 HTTP 重定向到 HTTPS
来源:互联网 发布:淘宝阿迪达斯高仿店铺 编辑:程序博客网 时间:2024/05/12 02:13
转自:http://www.cnblogs.com/tangge/p/4259749.html
1、购买SSL证书,参考:http://www.cnblogs.com/yipu/p/3722135.html
2、IIS7 / IIS 7.5 下绑定 HTTPS 网站(购买Wildcard SSL泛域名证书可绑定多个子域名)参考上文
3、下载安装URL重写模块:Microsoft URL Rewrite Module
32位:http://download.microsoft.com/download/4/9/C/49CD28DB-4AA6-4A51-9437-AA001221F606/rewrite_x86_zh-CN.msi
64位:http://download.microsoft.com/download/4/E/7/4E7ECE9A-DF55-4F90-A354-B497072BDE0A/rewrite_x64_zh-CN.msi
4、取消勾选“SSL设置”-》“要求 SSL”
5、ASP.NET站可直接修改web.config(与“6、IIS配置图示”效果相同),例如:见<rewrite>...</rewrite>节点
<?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>
6、IIS配置图示(图形化的操作过程,与上步效果相同,适用于asp/php等站)
选择要配置的网站,如:,找到“URL重写”,没有的话看上面第3步
进入“URL重写”模块,点击“添加规则”
选择“空白规则”
名称:HTTP to HTTPS redirect
模式:(.*)
条件输入:{HTTP}
模式:off 或 ^OFF$
或
重定向URL:https://{HTTP_HOST}/{R:1}
重定向类型:已找到(302) 或 参阅其它(303)
或
配置完成后“应用”到当前站点:
URL重写配置结果:
至此配置完成!
参考网站:
http://www.iis-aid.com/articles/how_to_guides/redirect_http_to_https_iis_7
http://www.jppinto.com/2010/03/automatically-redirect-http-requests-to-https-on-iis7-using-url-rewrite-2-0/
http://webactivedirectory.com/iis-microsoft/redirect-http-to-https-on-microsoft-iis-7-and-7-5/
http://blog.csdn.net/xuhuojun/article/details/6137154
- IIS7 / IIS7.5 URL 重写 HTTP 重定向到 HTTPS
- IIS7 / IIS7.5 URL 重写 HTTP 重定向到 HTTPS
- iis7 url重写和重定向
- IIS7 url重定向
- Win2008 r2 iis7/iis7.5系统下HTTP重定向
- IIS7 url重写
- IIS7.5 301重定向设置
- iis7规范URL及利用web.config进行重定向
- HTTPS重定向到HTTP
- HTTPS重定向到HTTP
- IIS7如何实现访问HTTP跳转到HTTPS访问
- Windows 2008 R2上配置IIS7或IIS7.5中的URLRewrite(URL重写)实例
- Windows 2008 R2上配置IIS7或IIS7.5中的URLRewrite(URL重写)实例
- Windows 2008 R2上配置IIS7或IIS7.5中的URLRewrite(URL重写)实例
- Windows 2008 R2上配置IIS7或IIS7.5中的URLRewrite(URL重写)实例
- 301重定向 IIS7 IIS7.5用web.config做域名的301重定向跳转示例
- IIS HTTP重定向到HTTPS
- okhttp3 http 重定向到 https
- 启动eclipse报错:Failed to load the JNI shared library
- 为什么Java接口里使用public static final修饰成员变量
- yum 查询软件信息
- 省份城市联动 多选
- Gulp 简易入门及API介绍
- IIS7 / IIS7.5 URL 重写 HTTP 重定向到 HTTPS
- 自己动手写个spring IOC容器
- android设置横竖屏切换时生命周期不会改变
- 第二章 adb 重启
- sql server 判断时间段是否重叠
- 移动非系统表空间文件到ASM中和从ASM中移回来 (使用rman)
- 一些shader的基本规则
- 数据结构 约瑟夫环问题C++
- ANDROID开发之SQLite详解