Если в корне проекта лежит файл urlrewrite.xml, то правила редиректа в нем будут задействованы (лучше перезагружать пул приложения IIS при этом).
Пример файла: https://pastebin.com/ARxW9xkv
В основном web.config указываем путь к файлу:
<rewrite>
<rules configsource="uploads\rewrite.config"></rules>
</rewrite>
В файле настроек rewrite прописываем правила:
<rules>
<rule name="Redirect to http" patternsyntax="Wildcard" stopprocessing="true">
<match url="*" negate="false"></match>
<conditions logicalgrouping="MatchAny" trackallcaptures="false">
<add input="{HTTPS}" pattern="off"></add>
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirecttype="Temporary"></action>
</rule>
<rule name="Robots" stopprocessing="true">
<match url="(.*)robots\.txt"></match>
<action type="Rewrite" url="/Controls/Resource/GetFile?code=robots"></action>
</rule>
<rule name="Sitemap.xml" stopprocessing="true">
<match url="(.*)sitemap\.xml"></match>
<action type="Rewrite" url="/Controls/Resource/GetFile?code=sitemap"></action>
</rule>
<rule name="Remove trailing slash" stopprocessing="true">
<match url="(.*)/$"></match>
<conditions logicalgrouping="MatchAll" trackallcaptures="false">
<add input="{REQUEST_FILENAME}" matchtype="IsFile" negate="true"></add>
<add input="{REQUEST_FILENAME}" matchtype="IsDirectory" negate="true"></add>
</conditions>
<action type="Redirect" url="{R:1}" redirecttype="Temporary"></action>
</rule>
<rule name="LowerCaseURL" stopprocessing="true">
<match url="[A-Z?-?]" ignorecase="false"></match>
<conditions logicalgrouping="MatchAll">
<add input="{HTTP_X_Requested_With}" pattern="^XMLHttpRequest$" negate="true"></add>
<add input="{URL}" pattern="[?-?]" negate="true"></add>
</conditions>
<action type="Redirect" url="{ToLower:{URL}}"></action>
</rule>
</rules>