I'm unable to remove the .html from the web domains in the url of my website. See below the web.config file for the site. I have a feeling it's to do with the patterns (match url) I'm using in "RewriteUserFriendlyURL1."

<?xml version="1.0" encoding="UTF-8"?>
            <clear />
            <add value="index.html" />
            <add value="index.htm" />
            <add value="Default.htm" />
            <add value="Default.asp" />
            <add value="iisstart.htm" />
            <clear />
            <rule name="Friendly" stopProcessing="true">
              <match url=".+" />
              <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
                <add input="{R:0}.html" matchType="IsFile" />
              <action type="Rewrite" url="{R:0}.html" />
            <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
              <match url="^(.*)\.(.*)$" ignoreCase="true" />
              <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
              <action type="Rewrite" url="{R:1}.(.*)" />

Related posts

Recent Viewed