客服联系方式

当前位置:首页 » 伪静态类 » 正文

ThinkPHP5.0伪静态规则文件适用于IIS 7.5

370 人参与  2025年05月17日 23:04  分类 : 伪静态类  评论

将以下代码另存为 web.config (文件名)上传保存到网站的web根目录,即可生效。

前提是服务器要安装URL Rewrite伪静态组件


<?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>

来源:州运宝转载请保留出处和链接!

本文链接:https://www.zhouyunbao.com/9.html

本站部分内容来源网络如有侵权请联系删除

<< 上一篇 下一篇 >>

州运宝app建站备忘录

    州运宝|州运宝app|州运宝备忘录

州运宝 |

州运宝