etangren 大佬有话说 :
NGINX如何写才可以跳转,那位28CM帮个忙
nginx 如果网址包含?问号get方式全部跳转指定网址。
28CM大佬甩个匹配代码来,谢过
论坛大师 大佬有话说 :
if ($request_method = GET) {
return 301 https://www.baidu.com/;
}https://cdn.jsdelivr.net/gh/master-of-forums/master-of-forums/public/images/patch.gif
雪丫鬟 大佬有话说 :
论坛大师 大佬有话说 : 2021-9-8 21:42
大佬速度真快。
heihai 大佬有话说 :
你这个,不好办吧,有参数的话连接符就有?https://cdn.jsdelivr.net/gh/hishis/forum-master/public/images/patch.gif
etangren 大佬有话说 :
论坛大师 大佬有话说 : 2021-9-8 21:42
这样是不是所有 http://xxx.com/aaa/eeee.html也跳转了呢?是想不含传递参数。也就是URL含有?问号就跳不含不跳
论坛大师 大佬有话说 :
etangren 大佬有话说 : 2021-9-8 21:44
这样是不是所有 http://xxx.com/aaa/eeee.html也跳转了呢?是想不含传递参数。也就是URL含有?问号就 …
你主贴写的只要是GET请求都跳的。要的不就是这个效果吗?https://cdn.jsdelivr.net/gh/master-of-forums/master-of-forums/public/images/patch.gif
etangren 大佬有话说 :
论坛大师 大佬有话说 : 2021-9-8 21:46
你主贴写的只要是GET请求都跳的。要的不就是这个效果吗?
我想的是url含有问号不管有没有参数 跳
不含?自然也传递不了什么,那就不跳
论坛大师 大佬有话说 :
etangren 大佬有话说 : 2021-9-8 21:49
我想的是url含有问号不管有没有参数 跳
不含?自然也传递不了什么,那就不跳 …
if ($args) {
return 301 https://www.baidu.com/;
}https://cdn.jsdelivr.net/gh/master-of-forums/master-of-forums/public/images/patch.gif