Change permissions to change IIS 8.5 URL

I want to create a rewrite rule in IIS 8.5 so that the TLD in the url changes 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 have something like this in my web.config but 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?

+3


source to share





All Articles