D
D
De YURII2016-02-18 01:40:39
Nginx
De YURII, 2016-02-18 01:40:39

How to specify dynamic path in nginx location?

You need to make location for search limit the number of requests.
The problem is that this directory is dynamic like index.php/Main/Search, so when I create a location, I get a 404 error, how can I specify it correctly?
location /search {
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Romanenko, 2016-02-18
@slimus

location ~ ^/.*search.*$
Change the regular expression to fit your paths

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question