HTM page extension 301s

Jun 27, 2014 at 3:51 PM
I love the module! I just did a website redesign and the old site pages have an extension .htm A sample page is domain.com/silverbell.htm I tried adding this as a custom url to the new DNN page which is domain.com/about-us/silverbell-manor but when I try requesting domain.com/silverbell.htm it doesn't do a 301 to the new DNN page. Is there something else that I need to do in the setup? Am I missing something else?

Thanks!
Coordinator
Jul 16, 2014 at 1:27 PM
I'll need to play around with this, but I think you have to do something with IIS. Like tell IIS to let .NET handle the processing of .html files. Otherwise, DNN never processes the page request.
Jul 16, 2014 at 1:44 PM
Edited Jul 16, 2014 at 1:44 PM
I ended up figuring out how to do this. There's a change that I had to make in the web.config in the <handlers> section. I had to add the following to the section so that the DNN instance would process .htm pages and now the redirect
<system.webServer>
<handlers>
<add type="System.Web.UI.PageHandlerFactory" requireAccess="Script" preCondition="integratedMode" path="*.htm" verb="GET,HEAD,POST,DEBUG" modules="ManagedPipelineHandler" name="HtmlHandler-Integrated" />
....
</handlers>
</system.webServer>
Coordinator
Jul 17, 2014 at 1:39 PM
Good to know! Thanks!
Aug 6, 2014 at 11:39 AM
Edited Aug 6, 2014 at 11:39 AM
Great! This helped me as well. Although I changed path to "*.html" which worked fine.
Jul 27, 2016 at 4:58 PM
I had this same issue but for .html jslaughter's solution fixed it, however, it caused the DNNGO Slider Module not to work because it uses a .html to configure the module. Added this to the web.config fixed it.

<buildProviders>
<remove extension=".resx" />
<remove extension=".resources" />
<!-- Added By Hilbert Solutions, LLC to support the DNNGO's Slider Module Config Page -->
<add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>