iis php web.config处理404,500等,跳转友好页面,显示500错误信息
<pre name="code" class="html"><?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpErrors errorMode="DetailedLocalOnly" existingResponse="PassThrough"></httpErrors> <defaultDocument> <files> <add value="index.php" /> </files> </defaultDocument></system.webServer> </configuration>
404,500友好提示跳转
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpErrors errorMode="DetailedLocalOnly"> <remove statusCode="404"/> <error statusCode="404" path="/404.htm" responseMode="ExecuteURL"/> <remove statusCode="500"/> <error statusCode="500" path="/500.htm" responseMode="ExecuteURL"/> </httpErrors> <defaultDocument> <files> <add value="index.php" /> </files> </defaultDocument> </system.webServer> </configuration>
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。