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

Forums / General Discussions / Html extension

Html extension

5 posts, 1 answered
  1. Henriette
    Henriette avatar
    41 posts
    Registered:
    20 Aug 2009
    24 Sep 2013
    Link to this post
    Hi forum members
    We are currently trying to allow .html extension on our sitefinity site. We have added the extension on pages and that Works fine, but when we use detailes pages build with the modulebuilder we get an error if we use the .html extension. Is there a workarround for this problem?

    An example of a detail page can be seen here: http://webshop.maling-gopris.dk/forside/6207-dyrup-robust-vaeg-acryl-10

    Thanks in advance and Kind regards
    Henrik
  2. Henriette
    Henriette avatar
    41 posts
    Registered:
    20 Aug 2009
    25 Sep 2013 in reply to Henriette
    Link to this post
    Anyone have knowledge about removing .html extension from details template? we also tryed Url rewriting, but it does not seem to work?

    Kind regards
    Henrik
  3. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    25 Sep 2013
    Link to this post
    Hey Henrik,

    This seems to work out fine:
    <rewrite>
        <rules>
            <rule name="rewritehtml">
                <match url="(.*)\.html$" ignoreCase="false" />
                <action type="Rewrite" url="{R:1}" />
            </rule>
        </rules>
    </rewrite>

    It allows both with and without the .html extension and doesn't invoke a '301' unless that is what you want of course. Tested it with News and E-commerce product details.

    Jochem
  4. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    25 Sep 2013
    Link to this post
    Hey Henrik,

    I've send you a direct email since an url-rewrite is getting caught by Sitefinity's spam protection.

    Jochem.
    Answered
  5. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    25 Sep 2013
    Link to this post
    As an update to the 'spam caught' rewrite rule post that'll show up eventually, the final change has this as an action:

    <action type="Redirect" url="{R:1}" />

    Jochem.
5 posts, 1 answered