Need help with rewrite

hello,

I need url

domain.com/en/forum/?a=1&a=2&lang=ru

to be rewrited to

domain.com/ru/forum/?a=1&a=2

I ended up with

if ($args ~* “lang=(en|lt|ru|de)(.)")
{
rewrite "^/.{2}(.
)$” /$arg_lang/$1? redirect;
}

but the GET variable “lang” is causing infinite loop - how to unset
the “lang” in nginx?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs