原因很简单,iis下需要重写URL重写规则.
网站根目录下新建web.config,把下面的代码复制进去就哦了
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
IIS URL重写配置
本文介绍如何在IIS环境下通过设置web.config文件实现URL重写。具体步骤是在网站根目录创建web.config,并加入特定XML代码片段,将所有请求重定向到index.php并附带原始路径参数。
1033

被折叠的 条评论
为什么被折叠?



