IIS环境下安装系统如果出现:
这个主要是IIS下的伪静态规则问题,解决办法:
1、关闭伪静态规则:
修改:common\config\main.php 文件
'enablePrettyUrl' => false
2、增加IIS伪静态规则(推荐的做法)
<?xml version="1.0" ?>
<rules>
<rule name="rewrite_admin_rewrite" stopProcessing="true">
<match url="admin/?(.*)"/>
<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="admin/index.php" appendQueryString="true"/>
</rule>
<rule name="rewrite_api_rewrite" stopProcessing="true">
<match url="api/?(.*)"/>
<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="api/index.php" appendQueryString="true"/>
</rule>
<rule name="rewrite_mobile_rewrite" stopProcessing="true">
<match url="mobile/?(.*)"/>
<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="mobile/index.php" appendQueryString="true"/>
</rule>
<rule name="rewrite_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>