2016-11-04 4 views
1

2つのドメイン(domainone.comとdomaintwo.comなど)があり、1つのウェブサイトを指しています。 domainone.comのSSL証明書が1つあります。複数のドメイン間でHTTPSにリダイレクトする

domainone.comのhttpsに自動リダイレクトしたいと思います。 domaintwo.comのためのhttpsへの自動リダイレクトをしたくありませんcoz私はこのdomaintwo.comのSSL証明書を持っていません。私はhttpでそれを開きたいだけです。

url rewrite(IIS)のルールは次のとおりです。

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) 

ここで、両方のドメイン名がhttpsに自動リダイレクトされるようになりました。 domainone.comのみhttpsに自動リダイレクトする方法を教えてください。

ありがとうございます。

答えて

0

条件を1つ追加しました。今は私が望むように働いています。

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) 
関連する問題