template 1 template 2 template 3

Browse by Category

There is no category under Plesk Control Panel

Enable custom error pages on Windows 2008

icon

Published: 07/23/2010 by admin

Categories: Plesk Control Panel

Tags: custom error errors windows 2008 iis7 404 403

Custom error pages can be implemented in Windows 2008 (IIS 7) by placing a web.config override file in the document root of your web site.  Below is example content for custom 403 and 404 status pages:

 

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpErrors errorMode="Custom" />
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" prefixLanguageFilePath="" path="/custom404.htm" responseMode="ExecuteURL" />
            <remove statusCode="403" subStatusCode="-1" />
            <error statusCode="403" prefixLanguageFilePath="" path="/custom403.htm" responseMode="ExecuteURL" />
        </httpErrors>
    </system.webServer>
</configuration>