V
V
Vitaly R2019-05-17 09:43:30
Nginx
Vitaly R, 2019-05-17 09:43:30

How to rewrite from one path to another?

The question is quite simple, for those who work with this.
I've been toiling for a day now and I can't find the syntax I need. Tried both rewrite and redirekt
I have a webproxy on which is nginx.
The site where nginx redirects everyone is offline and is located in the docker (yutrek). In the sense that there is nothing to configure inside.
I need all users who request my site to open the page I need instead of the main one.
Actually here:
When requesting www.my-syte.ru/dashboard, you need to redirect to www.my-syte.ru/dashboard?id=46fb0ff0-cea8-438c-9b5c-b0ee4234f038
I tried to do this through:
proxy_redirect https://www .my-syte.ru/dashboard https://www.my-syte.ru/dashboard?id=46fb0ff0-cea8-...
nginx didn't start
Next I tried:
# location /dashboard {
# rewrite ^/dashboard$ /dashboard?id=46fb0ff0-cea8-438c-9b5c-b0ee4234f038;
# }
Well, different syntaxes with rewrite which I found on the Internet. I tried everything, but since I don’t rummage, I can’t understand how to do it exactly.
Tell me good people.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question