View Complete Thread
  • URL Rewrite to redirect ONLY .html pages

    Sep 19, 2019 03:26 PM|steve841|LINK

    OK ..I've used the common URL rewrite to redirect http to https.

    Problem I'm seeing: Google crawls for sitemaps.xml and ads.txt and isn't happy.

    Can someone help me with the http to https redirect for HMTL pages only so the .xml and .txt are ignored?

    URL rewrite is Definitely my weakness.

    IIS 7 / Thanks.  Working/existing rule below.

                    <rule name="https" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
                        <match url="*" />
                        <conditions logicalGrouping="MatchAny">
                            <add input="{HTTPS}" pattern="" />
                        <action type="Redirect" url="{R:1}" redirectType="Permanent" />