当前位置:   article > 正文

IIS设置HTTP跳转HTTPS

IIS设置HTTP跳转HTTPS

网站根目录web.config文件:

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3. <system.webServer>
  4. <rewrite>
  5. <rules>
  6. <rule name="HTTP to HTTPS redirect" stopProcessing="true">
  7. <match url="(.*)" />
  8. <conditions>
  9. <add input="{HTTPS}" pattern="off" ignoreCase="true" />
  10. </conditions>
  11. <action type="Redirect" redirectType="Found" url="您的https域名" />
  12. <!-- 比如:
  13. <action type="Redirect" redirectType="Found" url="https://baidu.com" />
  14. -->
  15. </rule>
  16. </rules>
  17. </rewrite>
  18. </system.webServer>
  19. </configuration>

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/505127
推荐阅读
相关标签