需求访问 http://xxx.com/xxxx?src=http://yyy.com/ccccc?xsdfsa 重定向到 http://yyy.com/ccccc?xsdfsa
就是 nginx 匹配 args src=http://yyy.com/ccccc?sxdfsa , 重定向到 http://yyy.com/ccccc?sxdfsa
我试过 if ($args ~* src=(\w+?)(&|$)) {
set $src $1 ;
}
rewrite ^ $src redirect ;
但是 nginx 会报重定向次数过多
请问 V 友们有没有办法
就是 nginx 匹配 args src=http://yyy.com/ccccc?sxdfsa , 重定向到 http://yyy.com/ccccc?sxdfsa
我试过 if ($args ~* src=(\w+?)(&|$)) {
set $src $1 ;
}
rewrite ^ $src redirect ;
但是 nginx 会报重定向次数过多
请问 V 友们有没有办法