Answer the question
In order to leave comments, you need to log in
How to set up a redirect in nginx to a string in location?
Greetings, there is such a url:
https://example.com/away?get=https://www.example.r...
Is it possible to set up such a redirect in nginx through regular expressions so that it redirects
to the url that comes after "away?get=" ?
Or, if not possible, how to set up such a rewrite condition: - if the location has "away?get=*"
redirect to another site. Something like:
location ~^/away\?get=.*$ {
return 301 https://example.ru;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question