Nginx判断来路查询语句是否包含有Q=**,重写到https://xxxx.com/?Q=1010000004615312

if ( $query_string ~ “^Q=(.*)$” ){
rewrite ^ “https://xxxx.com/” last;

}

set $test 0;
if ($http_referer ~* “a.com”) {
set $test 1;
}
if ($http_referer ~* “b.com”) {
set $test 1;
}
if ($test = 1) {
return http://c.com;
}

$request_uri

 

例如判断fanqie

if ( $query_string ~ “^source=fanqie(.*)$” ){
rewrite ^ “http://page.52dede.com/novelapp_fq_shenle2_v1296_480_48032_f200_1625554093.apk” last;

发表评论

邮箱地址不会被公开。 必填项已用*标注