Html extension

Posted by Community Admin on 03-Aug-2018 08:26

Html extension

All Replies

Posted by Community Admin on 24-Sep-2013 00:00

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

Posted by Community Admin on 25-Sep-2013 00:00

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

Posted by Community Admin on 25-Sep-2013 00:00

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

Posted by Community Admin on 25-Sep-2013 00:00

Hey Henrik,

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

Jochem.

Posted by Community Admin on 25-Sep-2013 00:00

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.

This thread is closed