I want to create a rewrite rule in IIS 8.5 so that the TLD in the url gets changed from .com to .net.
example:
from: http://sub.domain.com/index.aspx?test=123
to: http://sub.domain.net/index.aspx?test=123
At the moment I got something like this in my web.config but is doesn't seem to work:
<rule name="TLD" enabled="false">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(www.)?([a-z]*.)(domain)(.com)(/?.*)$" />
</conditions>
<action type="Rewrite" url="http://{C:2}{C:3}.net/{C:5}" />
</rule>
Any suggestions?