IIS PHP Thinkphp 重定向 rewrite 设置默认header meta IE 兼容模式

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
  <!-- 设定IIS重定向规则,默认是index.php,如果不是自己修改-->
    <rewrite>
      <rules>
        <rule name="WPurls" enabled="true" stopProcessing="true">
          <match url=".*" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="index.php/{R:0}" />
        </rule>
      </rules>
    </rewrite>
<!-- 设定网站服务器以IE最高兼容模式 -->
    <httpProtocol>
      <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=edge" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

猜你喜欢

转载自blog.csdn.net/guoxingege/article/details/73647696