这个主要是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>