I\'m trying to redirect only user who enters http ://site.domain.com to https ://site.domain.com
Any other http page should not redirect to https (ex: http://site.domain
What is the regular expression to match the empty string for a rewrite rule?
But I would try to stick with ^$ and try this variant:
<rewrite>
<rules>
<rule name="Redirect to HTTPS" stopProcessing="false">
<match url="^$" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{SERVER_NAME}/" redirectType="Permanent" />
</rule>
</rules>
</rewrite>