+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / .html Extensions

.html Extensions

6 posts, 0 answered
  1. Zyad Rujeedawa
    Zyad Rujeedawa avatar
    31 posts
    Registered:
    18 Feb 2010
    07 Dec 2010
    Link to this post
    Hi,

    I can't get physical .html extensions to work under the same IIS where my siteifnity website is hosted.

    My site works well with htm and aspx files, but not html.

    In my web.config I have
    <cms defaultProvider="Sitefinity" pageExtension=".htm" disabled="false" pageEditorUIMode="Overlay">

    and my rewrite rule:
        <urlrewrites>
                <rule>
                    <url>(.*)\.htm</url>
                    <rewrite>$1.aspx</rewrite>
                </rule>
            </urlrewrites>

    I however need to be able to access physical HTML outside sitefinity, but in the same IIS
    I keep getting a 404 error.
    I've even tried to add .html extensions to run as aspnet.

    Any help,
    Zyad
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    07 Dec 2010
    Link to this post
    Hello Zyad Rujeedawa,

    Sitefinity can use .html extensions for your pages. You just need to set the pageExtension properly and make that you add a handler mapping on the IIS site for .htm and .html requests to the ASP.NET IsapiModule. You do not need to use url rewrite. If you use the .html extension make sure that you have the bellow setting in web.config:

    <system.webServer>
      <modules runAllManagedModulesForAllRequests="true">


    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    08 Dec 2010
    Link to this post
    Can I hijack this one for a sec? :)

    I setup an HttpModule in App_Code to detect requests coming in from my domain with .html extension in order to do some 301s...all works fine on my dev box (IIS 7.5) but deployed up to the IIS6 server the request looks like this

    error-page.aspx?id=404http://www.site.com:80/testpage.html

    where on dev it's just
    http://www.site.com/testpage.html

    Is that due to IIS6 not handling the .html?
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    08 Dec 2010
    Link to this post
    Hello Steve,

    In IIS 7.0 and higher http modules are registered in system.webServer/modules configuration section. In IIS 6.0 this is done in system.web/httpModules. Make sure that your custom Http module is registered in the system.web/httpmodules for IIS 6.0

    Regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    08 Dec 2010
    Link to this post
    Oh yeah, no I know that, and it runs fine...there's no issue with the httpmodule running

    The issue is when I'm checking the URL in the Request...for .htm, .aspx it all comes in fine, but with .html I get the 404 page prefixed to it...so my THOUGHT is that it 404's on the .html since the page doesn't exist (and doesnt even run through the pipline).  Then goes over to the 404 page which THEN gets routed through the pipe and since the url then still ends with .html it just runs the code I have prefixed with the 404 crap.

  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    08 Dec 2010
    Link to this post
    Hi Steve,

    Can you please check the extension mappings for your IIS server?

    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
6 posts, 0 answered