T
T
Toopie2018-10-28 16:31:34
Nginx
Toopie, 2018-10-28 16:31:34

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.Registrationto be cut out by nginx, and so that it eventually becomes like this:

https://api.domain.ru/?method=user.Registration&login=...

I will be very grateful for your help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Syomov, 2018-10-28
@kotomyava

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 question

Ask a Question

731 491 924 answers to any question