E
E
Egor Sh2016-05-26 15:11:08
Nginx
Egor Sh, 2016-05-26 15:11:08

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

1 answer(s)
A
Andrey Burov, 2016-05-26
@BuriK666

location = /Egor {
...
}

if ($request_uri = '/Egor') { # ну или просто $uri
...
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question