[英]Nginx redirect to another page if url contain specific query string
如果 URL 包含以 fl=&fl= 开头的查询字符串,我想将所有 URL 重定向到另一个页面
传入的 URL 可以是任何以查询字符串 fl=&fl= 开头的内容
https://example.com/a-core/?fl=&fl=test&fl=test1&fl=xyz;&fl=test3&fl=test4&fl=test5
https://example.com/a-core/?fl=&fl=test&fl=test0&fl=cpl;&fl=test8&fl=test9&fl=test7
以上所有 URL 都以查询字符串 fl=&fl= 开头,需要重定向到 example2.com/test123
我试过这个但没有用
if ($args = "fl=&fl=*") {
return 301 https://example2.com/test123;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.