A
A
Alexey Denisov2021-05-21 13:57:05
Nginx
Alexey Denisov, 2021-05-21 13:57:05

How to rewrite address in NGINX config?

Tell me how Config to rewrite the address in the request, leave the parameters.

From this:

https://example.com/media/samplesdomenu?variable=2&rate=540

Make like this:
https://example.com/media/samples?variable=2&rate=540


samplesdomain -> samples

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-05-21
@Denisov80

rewrite ^/media/samplesdomenu$ /media/samples permanent;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question