I'm trying to get a rule working whereby the language identifier is in the url path. We want to force the url to the en version if a language is not specified. For example:
www.domain.com/page.aspx should redirect to www.domain.com/en/page.aspx
Here's the rule we have so far, but it keeps ending up in a redirect loop.
<rule name="Default Language" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{REQUEST_URI}" pattern="^/(en|es|ph)/" negate="true" ignoreCase="true" />
</conditions>
<action type="Redirect" url="/en/{R:1}" redirectType="Permanent" />
</rule>
Any ideas where it's going wrong?