感谢您的关注,我们一直致力于为您提供放心、满意的服务。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ThinkPHP" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>放在站点根目录的 web.config 里,作用是让 PHP 网站(尤其是 ThinkPHP 这类框架)伪静态页面 URL 正常访问,同时把所有动态请求统一交给index.php入口文件处理。