Thursday, November 15, 2018

How do I IIS redirect only one domain on SSL?

IIS redirect only one domain on SSL:

For the particular domain redirection we need to add an additional condition to rewrite rule, Which will check the host:
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<add input="{HTTP_HOST}" pattern="^(www.)?" />
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
Note: I have done for the domain.

No comments:

Post a Comment