直接上代码:
1 2 3 4 5 6 7 8 | < rewrite > < rule name = "https" stopProcessing = "true" > < match url = "(.*)" /> < conditions > < add input = "{HTTPS}" pattern = "off" /> </ conditions > </ rule > </ rewrite > |
使用须知:此代码直接复制到iis站点根目录的web.config的<system.webserver>内即可
注意事项:服务器必须安装 rewrite 如果没有安装请在本站首页查找下载并按照