I have IIS 8 installed on Windows Server 2012 R2
Followed these steps to configure http to https so when clicking on http://a5.example.com, user is redirected to https://a5.example.com
but http to https redirection isn't working. disabled Require SSL on IIS
web.config:
<system.webServer>
<rewrite>
<rules>
<rule name="Http to HTTPS" enabled="true" stopProcessing="true">
<match url=""(.*)"" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
If i remove quotes in pattern
<match url="(.*)" />
getting error when typing http://a5.example.com
Tried these solutions and these but nothing helps
Updates after @JennyDai's answer:
Currently unable to change source code (set AllowAutoRedirect)
Enabled ARR proxy
but as soon as in web.config i specify
<match url="(.*)" />
and going to http://a5.example.com same error as in the above picture appears (document moved), https://a5.example.com/ws/services.asmx is available
when set <match url=""(.*)"" />
no errors and http to https doesn't work.