problem description
A website binds two domain names to access (123.com abc.com), and then involves a jump problem (123.com to www.123.com abc.com to www.abc.com) and http to https
configuration of Server segment on PC:
set $flag 0;
if ($scheme = http) {
set $flag "${flag}1";
}
if ($host = "www.123.com") {
set $flag "${flag}1";
}
if ($host = "www.abc.com"){
set $flag "${flag}0";
}
if ($flag ="011"){
return 301 https://www.123.com$request_uri;
}
if ($flag ="010"){
return 301 https://www.abc.com$request_uri;
}
configuration in mobile server:
set $flag 0;
if ($scheme = http) {
set $flag "${flag}1";
}
if ($host = "m.123.com") {
set $flag "${flag}1";
}
if ($host = "m.abc.com"){
set $flag "${flag}0";
}
if ($flag ="011"){
return 301 https://m.123.com$request_uri;
}
if ($flag ="010"){
return 301 https://m.abc.com$request_uri;
}
then when you check the configuration, you will prompt
invalid condition "$flag" in Mobile profile