卡卡北 发表于 2018-12-27 21:04

IIS下让PHP支持path_info的方法

在网站根目录建一个文件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>

卡卡北 发表于 2018-12-27 21:06

相关:
什么是“path_info”
Apache下让PHP支持path_info的方法
Nginx下PHP支持path_info的方法
IIS下让PHP支持path_info的方法
页: [1]
查看完整版本: IIS下让PHP支持path_info的方法