显示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>

————————————————
版权声明:本文为CSDN博主「Zmsn丨星辰」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zmsnxingchen/article/details/42804513

相关文章:

  • 2021-06-30
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
猜你喜欢
  • 2021-08-29
  • 2022-12-23
  • 2021-10-19
  • 2021-12-12
  • 2021-12-12
  • 2021-05-23
  • 2021-09-21
相关资源
相似解决方案