Skip to content

Commit 869d2f9

Browse files
committed
Custom 404 error handler in web.config
1 parent 226f0a7 commit 869d2f9

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

BlogEngine/BlogEngine.NET/Web.Config

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,16 @@
156156
</httpHandlers>
157157
</system.web>
158158
<system.webServer>
159-
<validation validateIntegratedModeConfiguration="false" />
159+
<validation validateIntegratedModeConfiguration="false" />
160+
<!--
161+
Uncomment below to configure custom 404 error; if blog in subfolder,
162+
like "/blog", make sure path includes subfolder
163+
-->
164+
<!--<httpErrors existingResponse="Replace" errorMode="Custom">
165+
<remove statusCode="404" subStatusCode="-1" />
166+
<error statusCode="404" prefixLanguageFilePath="" path="/error404.aspx" responseMode="ExecuteURL" />
167+
</httpErrors>-->
168+
160169
<!-- Enable the staticContent section below to add Expires headers to images for better performance.
161170
Some hosting providers does not allow the staticContent section to be set. -->
162171
<!--

0 commit comments

Comments
 (0)