Answer the question
In order to leave comments, you need to log in
How to make such a redirect in nginx?
Hello.
The task, in fact, is easy, but I simply do not know how to google it correctly.
A request comes from the user: https://api.domain.ru/user.Registration?login=...
I need the method user.Registration
to be cut out by nginx, and so that it eventually becomes like this:
https://api.domain.ru/?method=user.Registration&login=...
Answer the question
In order to leave comments, you need to log in
You need something like this:
The remaining parameters will be added automatically.
Well, then, depending on the necessary actions, add the permanent flag for the redirect, or process the url somewhere in the location, or ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question