在网站根目录建一个文件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 rewrite
原文链接:https://www.f2er.com/windows/566664.html