2016-11-04 4 views
1

Ich habe zwei Domänen (z. B. Domainone.com und domaintwo.com) und sie verweisen auf eine Website. Ich habe ein SSL-Zertifikat für Domainone.com.Umleiten zu HTTPS zwischen mehreren Domänen

Ich möchte eine automatische Weiterleitung zu https für Domainone.com tun. Ich möchte keine automatische Weiterleitung zu https für domaintwo.com coz Ich habe kein SSL-Zertifikat für dieses domaintwo.com. Ich möchte es nur mit http öffnen.

Die Regel in URL-Rewrite (IIS) ist wie folgt.

Match URL – Requested URL: Matches the Pattern 
Match URL – Using: Regular Expression 
Pattern: (.*) 

Condition Input: {HTTPS} 
Check if input string: Matches the Pattern 
Pattern: ^OFF$ 

Action type: Redirect 
Redirect URL: https://{HTTP_HOST}/{R:1} 
Redirect type: See Other (303) 

Jetzt sind beide Domain-Namen automatisch auf https umleiten. Bitte helfen Sie mir zu tun, um automatisch auf https für nur Domainone.com umleiten.

Vielen Dank.

Antwort

0

Ich fügte eine Bedingung hinzu. Jetzt funktioniert es wie ich will.

Match URL – Requested URL: Matches the Pattern 
Match URL – Using: Regular Expression 
Pattern: (.*) 

Condition Input: {HTTPS} 
Check if input string: Matches the Pattern 
Pattern: ^OFF$ 
Condition Input: {HTTP_HOST} 
Check if input string: Matches the Pattern 
Pattern: domainone.com 

Action type: Redirect 
Redirect URL: https://{HTTP_HOST}/{R:1} 
Redirect type: See Other (303) 
Verwandte Themen