.html extension and 404

Oct 24, 2007 at 5:41 PM
I am using <add key="BlogEngine.FileExtension" value=".html"/> so that all BE.net pages render and resolve to .html. This requires configuring the website so that the .html file extension is handled by asp.net.

Error404.aspx renders all 404 errors within BE.net. By default error404.aspx will only come up for .aspx pages. I modified custom errors settings for this website in IIS so that all 404 errors are sent to error404.aspx (no extension, .htm, etc). However for some reason .html 404 errors do not go to error404.aspx. Instead they serve a 200 status code and no page (just blank).

Does anybody have any ideas on this one?
Oct 25, 2007 at 4:47 PM
you need to edit your web.config so the errors section looks something like this:

<customErrors mode="RemoteOnly">
<error statusCode="404" redirect="/error404.aspx" />
Oct 25, 2007 at 8:07 PM
Yes, I already have that included in the web.config, hence .aspx pages are being redirected properly.