Created
October 18, 2019 16:01
-
-
Save tackme31/2cf266878f28766716c5c2c1dfdb9e55 to your computer and use it in GitHub Desktop.
A configuration for setting a custom error page to Sitecore when a 404, 50x error occurs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Add the following section to your web.config --> | |
<httpErrors errorMode="Custom" existingResponse="Replace"> | |
<remove statusCode="404" subStatusCode="-1" /> | |
<remove statusCode="500" subStatusCode="-1" /> | |
<remove statusCode="501" subStatusCode="-1" /> | |
<remove statusCode="502" subStatusCode="-1" /> | |
<!-- Response the not found page (without changing a URL) --> | |
<error statusCode="404" prefixLanguageFilePath="" path="/notfound" responseMode="ExecuteURL"/> | |
<!-- Redirect to the static error page --> | |
<error statusCode="500" prefixLanguageFilePath="" path="/error.html" responseMode="Redirect"/> | |
<error statusCode="501" prefixLanguageFilePath="" path="/error.html" responseMode="Redirect"/> | |
<error statusCode="502" prefixLanguageFilePath="" path="/error.html" responseMode="Redirect"/> | |
</httpErrors> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment