社区首页 > 安装使用 > ShopWind系统在IIS环境下安装出现HTTP404/500的解决办法

ShopWind系统在IIS环境下安装出现HTTP404/500的解决办法

乔帮主发表在 安装使用 2021-01-20 04:01:31 946

IIS环境下安装系统如果出现:

170503sul06d3l2do0b7u7.png

这个主要是IIS下的伪静态规则问题,解决办法:

1)关闭伪静态规则:
     修改:common\config\main.php   文件
   'enablePrettyUrl' => false
2 ) 增加IIS伪静态规则(推荐的做法

  找到web.config 文件,在里面追加<rewrite>节点:

 <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <httpErrors errorMode="Detailed" />
    <rewrite>
      <rules>
        <rule name="rewrite" stopProcessing="true">
          <match url="." ignoreCase="false" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
          </conditions>
          <action type="Rewrite" url="index.php" appendQueryString="true" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration> 

回复
Re :
您需要登录后才可以回帖 登录