Answer the question
In order to leave comments, you need to log in
How to write location in nginx with regular expressions at the end of the URL?
A URL like this
https://site.ru/seek?full_slug=slovo&cat=-1&page=2
you need to write a rule to fall under this URL and similar ones, slovo can be any and page=2, can be any 3,4,5, 6 etc.
I wrote this: and many other options, but they do not fit, please help
location ~* ^.+\=(2|3)$
{ try_files $uri $uri /index.php?$args;
deny 94.143.197.111;}
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