I have a one website application pointing multiple domains.
what i want is, if user visiting domain1.com then they should be redirect to https://www.domain1.com
and rest all domain pointing same application use without https (e.g http://www.domain2.com / http://www.domain3.com)
Domain must redirect as below:
- domain1.com > https://www.domain1.com
- domain2.com > http://www.domain2.com (rewrite as below code)
- domain3.com > http://www.domain3.com (rewrite as below code)
Below code to rewrite for other than https domains.
<rule name="domain1" stopProcessing="true">
<match url="^www.domain1.com$" negate="true" />
<action type="Rewrite" url="otherdomain/{R:1}" />
</rule>
Appriciate your help in advance. Thanks