Answer the question
In order to leave comments, you need to log in
How to compose a rule for NGIX for a page with a parameter?
There is a following task - there is a site on Wordpress with the included cache. Someone is constantly hammering at him on the heaviest page with a request like /slow-page?workaround=time(). Since there is no page in the cache, a new one is generated, which heavily loads the server. I added this rule to
location / {
if ( $args ~ "workaround=" ) { return 404; }
}
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