-1

How can I redirect with url rewrite e.g. from https://www.contoso.com to another server e.g. to https://www.testpage.com

tm3241
  • 11
  • 2

1 Answers1

0

You can use iis url rewrite for redirection, and use this rule:

<rule name="test">
  <match url="^(.*)$" />
    <conditions>
     <add input="{HTTP_HOST}" pattern="^www.contoso.com$" />
    </conditions>
  <action type="Redirect" url="https://www.testpage.com/{R:1}" />
</rule>
samwu
  • 3,857
  • 3
  • 11
  • 25