How can I redirect with url rewrite e.g. from https://www.contoso.com to another server e.g. to https://www.testpage.com
Asked
Active
Viewed 603 times
1 Answers
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
-
I do not want to forward from http to https but from https to https – tm3241 Jul 26 '22 at 08:44
-
The rule in this answer also apply to HTTPS to HTTPS. – samwu Aug 01 '22 at 03:15
-
But the rule does not work – tm3241 Sep 16 '22 at 18:14