IIS PHP Web. config handles 404,500, jumps to friendly pages, displays 500 error messages

Source: Internet
Author: User
Tags: php yii config error jump 500 detailed display

Show 500 error message
<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 friendly tips to jump

<? 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 handles 404, 500, etc., jumps to a friendly page and displays a 500 error message

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.