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>
                    <rule name="https" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
                        <match url="*" />
                        <conditions logicalGrouping="MatchAny">
                            <add input="{HTTPS}" pattern="www.123.com" />
                        </conditions>
                        <action type="Redirect" url="https://www.123.com/{R:1}" redirectType="Permanent" />
                    </rule>