IIS7 / IIS7.5 URL 重写 HTTP 重定向到 HTTPS
2015-05-28 10:49
507 查看
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>节点
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
标签: IIS
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
标签: IIS
相关文章推荐
- IIS7 / IIS7.5 URL 重写 HTTP 重定向到 HTTPS(转)
- IIS7 / IIS7.5 URL 重写 HTTP 重定向到 HTTPS
- IIS7 / IIS7.5 URL 重写 HTTP 重定向到 HTTPS
- IIS7/IIS7.5 URL 重写 HTTP 重定向到 HTTPS的方法
- 在ASP.NET中重写URL 方法三:在IIS7中使用HttpModule 实现无扩展名的URL重写
- .htaccess重写URL 实现http自动跳转https
- iis7下实现内网OWA重定向以及http重定向到https
- IIS7,IIS7.5 URL重写模块工具
- IIS7的HTTP到HTTPS的重定向
- URL重写之在IIS7中使用HttpModule,在IIS5和IIS6中使用 ISAPIRewrite实现无扩展名的URL重写(节选自福娃儿)
- IIS 重写 HTTP 重定向到 HTTPS
- .NET4.0下网站应用程序用UrlRewriter.dll重写无后缀路径 (在IIS7.5中的配置方法)
- 判断是不是以http:// ftp://和https:// 开头的URL
- weblogic.net.http.SOAPHttpsURLConnectionl类型解决
- .NET4.0下网站应用程序用UrlRewriter.dll重写无后缀路径 (在IIS7.5中的配置方法)
- 解析http302重定向url
- HTTP header location 重定向 URL
- weblogic.net.http.SOAPHttpsURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
- Nginx服务器http重定向到https
- Centos设置apache ,http重定向为https