Enable custom error pages on IIS 7 (Windows 2008) and newer

Custom error pages can be implemented in IIS 7 (Windows 2008) and newer 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"?>
            <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" />


Was this answer helpful? 0 Users Found This Useful (0 Votes)