活动:一次性充值满500元,云服务器、虚拟主机产品8折特惠! 全国免费咨询热线:℡ 400-9918-136
帮助和公告

感谢您的关注,我们一直致力于为您提供放心、满意的服务。

优惠活动香港云服务器,免备案在线开通,预装宝塔(bt)面板,独享10M带宽,赠送DDOS防护,免费技术支持,代理低至6折,仅需48元/月!
返回首页

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

信息来源:亿速互联修改时间:2018/4/28 7:25:45

将以下代码另存为 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>


以下为最近更新的内容