I'm trying to create an IIS rule to redirect mobile users to the mobile site. The main site (desktop version) is in the root route ('/'), and the mobile site is in the route '/mobile'
I created this IIS rule, but when I try it in desktop it's work well, but in mobile, I got an error ERR_TOO_MANY_REDIRECTS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Rewrite Mobile" enabled="true" stopProcessing="true">
<match url="(.*)" ignoreCase="true"/>
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_USER_AGENT}" pattern="midp|mobile|phone" />
<add input="{HTTP_X-Device-User-Agent}" pattern="midp|mobile|phone" />
<add input="{HTTP_X-OperaMini-Phone-UA}" pattern="midp|mobile|phone" />
</conditions>
<action type="Redirect" url="mysiteurl/mobile" appendQueryString="false" />
</rule>
</rewrite>
</system.webServer>
</configuration>