Thinkphp5 iis环境下安装报错400 500

浏览:2499 发布日期:2017/09/11 分类:功能实现 关键字: thinkphp5 iis 400 500
iis环境下装thinkphp5,伪静态报错
在iis环境下安装thinkphp,开启了伪静态规则,报错400 500,解决方法如下:

新建文件web.config 放到入口目录下(如public/web.config 或者/web.config),内容如:<?xml version="1.0"?>
<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>
Thinkphp5高级交流群: 101766150
评论( 相关
后面还有条评论,点击查看>>