目前,在我的生产服务器上,我有如下的入站规则集,它可以满足我的所有要求。
入站规则如下。
Match URL section
Requested URL: Matches the Pattern
Using: Regular Expression
Pattern: (.*)
Ignore Case: checked.
Conditions section
Logical grouping: Match All.
Input: {HTTPS}
Type: Matches the Pattern
Pattern: ^OFF$
Track capture groups across conditions: unchecked.
Action section:
Action type: Redirect
Redirect URL: https://www.domainname.com/{R:0}
Append query string: checked.
Redirect Type: Permanent (301).
我的要求是:当用户输入
https://beta.domain.com it should redirect to https://www.domain.com.
如果用户输入
http://beta.domain.com it should redirect to https://www.domain.com.
如果用户键入
http://www.domain.com it should redirect to https://www.domain.com
如果用户键入
http://domain.com it should redirect to https://www.domain.com
提前致谢。任何帮助,将不胜感激。
提前致谢。