Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

Re: nginx rewrite ?&

$
0
0
Попробовал:

location = /test {
if ($args ~ ^&) {
return 301 http://example.com/work/;
}

default_type text/plain;
return 200 $args;
}

Робит: либо выводит переменную, либо делает редирект.


4 апреля 2013 г., 13:10 пользователь skeletor <nginx-forum@nginx.us>написал:

> К сожалению и с args тоже не заработал. Пробовал вот так:
>
> if ($args ~* ^&) {
> rewrite ^ http://$host permanent;
> }
>
> if ($args ~* "^&") {
> rewrite ^ http://$host permanent;
> }
>
> if ($args ~* "^\&") {
> rewrite ^ http://$host permanent;
> }
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?21,238083,238087#msg-238087
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
>



--
Best Regards,
Vadim Lazovskiy
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>