Попробовал:
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
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