I have an old website hosted on A2 Hosting and I'm trying to redirect it to my new domain hosted on GoDaddy. I've tried editing the "HTTP to HTTPS Redirect" rule on my web.config, however, it is still not redirecting.
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^www.test.gov.mp$" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://www.test.health/{R:1}" />
</rule>
</rules>
</rewrite>
test.gov.mp is my old domain and test.health is my new domain.
If you want to redirect
www.test.gov.mptowww.test.health, you can refer to this rule. The pattern is using a regular expression, to check if {HTTP_HOST} is equal towww.test.gov.mp, the {R:1} in the action means whatever is in the URL behind the domain name itself.