Quantcast
Channel: Configuration and Deployment
Viewing all articles
Browse latest Browse all 3561

Re: HTTPS_CLUSTER_HTTPS - Issue 301 redirecting to HTTPS & www

$
0
0

Hi Shailesh,

About rewrite HTTP to HTTPS and non-www to www, you can refer to Web.config redirects with rewrite rules - https, www, and more.

Redirect to HTTPS:

<rule name="RedirectToHTTPS" stopProcessing="true"><match url="(.*)" /><conditions><add input="{HTTPS}" pattern="off" ignoreCase="true" /></conditions><action type="Redirect" url="https://{SERVER_NAME}/{R:1}" redirectType="Permanent" /></rule>

Redirect www to non-www:

<rule name="RedirectWwwToNonWww" stopProcessing="false"><match url="(.*)" /><conditions logicalGrouping="MatchAll" trackAllCaptures="false"><add input="{HTTP_HOST}" pattern="^(www\.)(.*)$" /></conditions><action type="Redirect" url="https://{C:2}{REQUEST_URI}" redirectType="Permanent" /></rule>

Best Regard,

Yang Shen


Viewing all articles
Browse latest Browse all 3561

Trending Articles