I'd like to add www to every domain name of a website. These are the domains I like to include:
- domain.com
- domain.nl
- domain.de
- domain.co.in
What I have so far is:
<rule name="Prepend www to 2nd level domain names" enabled="true" stopProcessing="true">
<match url=".*" />
<conditions trackAllCaptures="true">
<add input="{HTTP_HOST}" pattern="^([^.]+\.[^.]+)$" />
<add input="{CACHE_URL}" pattern="^(.+)://" />
</conditions>
<action type="Redirect" url="{C:2}://www.{C:1}/{R:0}" />
</rule>
This works for all the domains, except the co.in. I'm not sure how I can also include TLD's with more than one '.'?