I'm having a weird redirect loop that only shows up on mobile devices.
I'm using IIS10 & urlrewrite to redirect requests to HTTPS. I've installed an SSL certificate from sectigo and used the same redirect rule that's always worked for me. It's quite weird that it works fine on desktop but not on mobile.
I've tested the issue persists across any mobile-device browser: safari, chrome, firefox and both Android/IOS devices across different networks. I've cleared the cache on the devices manually several times and it does nothing to solve the problem.
On the server side I have 4 bindings total IE:
example.com
www.example.com
https://example.com
https://www.example.com
With server identification turned on and the correct cert file selected for the 2 HTTPS bindings. The URL rewrite rule is:
<rewrite>
<rules>
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>