Answer the question
In order to leave comments, you need to log in
How to cut off part from url and check in nginx location?
Good afternoon!
Such a question, let's say I have a url like mysite.com/Egor
How can I cut off the last part from it, that is, Egor, and check that there is nothing after it, that is, a line not like mysite.com/Egor/smt/1 ?
Answer the question
In order to leave comments, you need to log in
location = /Egor {
...
}
if ($request_uri = '/Egor') { # ну или просто $uri
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question