I am new at nginx and need help with redirect (basically I am a Java Dev), so here is what I need suggestions for : I have a url https://www.mysite.com/abc?server=10.2.2.10
I want nginx to check if server param is set then it should rewrite url to
https://10.2.2.10/abc
here is what I have tried but it isn't working:
location /abc/{ # I have also tried with /abc
if ($arg_server != ""){
rewrite https://$arg_server/$1 permanent;
}
}
any suggestions please? Thank you for any helps guys
best Regards Sajid