首页 > Web开发 > 详细

iis php web.config处理404,500等,跳转友好页面,显示500错误信息

时间:2015-01-17 12:39:21      阅读:520      评论:0      收藏:0      [点我收藏+]
显示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>


iis php web.config处理404,500等,跳转友好页面,显示500错误信息

原文:http://blog.csdn.net/zmsnxingchen/article/details/42804513

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!