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"?>
    <configuration>
      <system.webServer>
        <defaultDocument>
          <files>
            <clear />
            <add value="index.html" />
            <add value="index.htm" />
            <add value="Default.htm" />
            <add value="Default.asp" />
            <add value="iisstart.htm" />
          </files>
        </defaultDocument>
        <rewrite>
          <rules>
            <clear />
            <rule name="Friendly" stopProcessing="true">
              <match url=".+" />
              <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
                <add input="{R:0}.html" matchType="IsFile" />
              </conditions>
              <action type="Rewrite" url="{R:0}.html" />
            </rule>
            <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" />
              </conditions>
              <action type="Rewrite" url="{R:1}.(.*)" />
            </rule>
          </rules>
        </rewrite>
      </system.webServer>
    </configuration>

Related posts

Recent Viewed