Sunday, August 09, 2009 12:03 PM kehand

PHP and Custom Error Pages

When deploying PHP web applications that handle their errors with their own error pages, the existingResponse for Custom Error Pages feature of IIS should be set to “PassThrough” for that particular site. This greatly improves the customer experience when accessing your new application, particularly if your custom error pages are merely the defaults that come with IIS.

Custom Error Pages set to “Auto” (the default):

scratch1

Custom Error Pages set to “PassThrough”:

scratch2

This property can be set for either the site in particular or the server as a whole. To set it for the server, using appcmd.exe (found in %windir%\system32\inetsrv), the command is

appcmd.exe set config -section:system.webServer/httpErrors /existingResponse:"PassThrough" /commit:apphost

However, you can also do this on a per site, application, or virtual directory basis as well. Using appcmd, use the following command:

appcmd.exe set config "Default Web Site/application" -section:system.webServer/httpErrors /existingResponse:"PassThrough"

Replace “Default Web Site/application” with the actual path to your desired location to change.

You can also do this by editing (and creating if needed) a web.config file in the actual folder of the location, which would look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors existingResponse="PassThrough" />
    </system.webServer>
</configuration>

And voila, you’re done!

Tags:

Comments

# re: PHP and Custom Error Pages

Monday, August 17, 2009 8:19 PM by kehand

What kind of problems are you having with PHP?

# re: PHP and Custom Error Pages

Tuesday, November 17, 2009 6:31 PM by infiple

Hello..I have some troubles with the conversion of movie to iPhone. I bought an <a href="unlockiphone22.com/.../a>  last week and yesterday when I put a movie onto iPhone and click play, the phone give me a warning that he cannot play video in that format. I think I need to convert the movies to iPhone supported format first. So how can I deal with the conversion? Can any one recommend a powerful and free converter for me ?

# re: PHP and Custom Error Pages

Tuesday, November 17, 2009 7:59 PM by infiple

if i had a brand new never opened iphone that i bought without a contract and it says no sim installed can i put in an old cingular sim card that used to be activated but now isnt will i be able to get to the <a href="unlockiphone22.com/">click here</a>  home screen and be able to use the ipod and wifi but not the phone function

# re: PHP and Custom Error Pages

Friday, November 20, 2009 7:51 AM by infiple

if i had a brand new never opened iphone that i bought without a contract and it says no sim installed can i put in an old cingular sim card that used to be activated but now isnt will i be able to get to the <a href="unlockiphone22.com/.../a>  home screen and be able to use the ipod and wifi but not the phone function

Leave a Comment

(required) 
(required) 
(optional)
(required)