ThinkPHP在Windows IIS 7.5或以上版本的伪静态规则
请将以下代码另存为web.config文件,注意后缀是.config,可以先保存在记事本中,重命名,然后上传到网站根目录中,即可生效。
<div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"><?xml version="1.0" encoding="UTF-8"?> </div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"><configuration></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> <system.webServer></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> <rewrite></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> <rules></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> <rule name="ThinkPHP" stopProcessing="true"></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> <match url="^(.*)$" ignoreCase="false" /></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> <conditions logicalGrouping="MatchAll"></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> </conditions></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" /></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> </rule></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> </rules></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> </rewrite></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"> </system.webServer></div><div style="outline: 0px; border: 0px currentcolor; box-sizing: border-box;"></configuration></div>
版权声明:
本站资源和文章内容大部分收集于网络,
本站所有资源的版权均属于原作者所有,
本站资源只用于参考学习,请勿直接商用,
若由于商用引起版权纠纷,一切责任均由使用者承担。
若有侵权之处请联系站长我们会第一时间删除
本文由XM技术学习分享发布,如需转载请注明出处。