当前位置:   article > 正文

iis web.config 配置示例

iis web.config 模板

`<?xml version="1.0" encoding="UTF-8"?>

  1. <configuration>
  2. <system.webServer>
  3. <rewrite>
  4. <rules>
  5. <rule name="Redirect" stopProcessing="true">
  6. <match url=".*" />
  7. <conditions>
  8. <add input="{HTTP_HOST}" pattern="^domain.com$" />
  9. </conditions>
  10. <action type="Redirect" url="http://www.domain.com/{R:0}" redirectType="Permanent" />
  11. </rule>
  12. <rule name="301" stopProcessing="true">
  13. <match url="^wap(.*)$" ignoreCase="false" />
  14. <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
  15. <action type="Redirect" url="http://m.domain.com{R:1}"/>
  16. </rule>
  17. <rule name="OrgPage" stopProcessing="true">
  18. <match url="^(.*)$" />
  19. <conditions logicalGrouping="MatchAll">
  20. <add input="{HTTP_HOST}" pattern="^(.*)$" />
  21. <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  22. <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
  23. </conditions>
  24. <action type="Rewrite" url="index.php/{R:1}" />
  25. </rule>
  26. </rules>
  27. </rewrite>
  28. </system.webServer>

</configuration>`

转载于:https://my.oschina.net/u/1029242/blog/1794117

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

闽ICP备14008679号