Answer the question
In order to leave comments, you need to log in
How to remove one of the arguments in a request to nginx?
For example, a request comes to nginx
site.ru/?mvx=34234&rty=23423
Moreover, the values of the arguments can change.
How can I remove the mvx argument with its value from the request and still keep the other arguments?
I understand that rewrite will help here, but something got stuck with writing a regular expression.
It is necessary that the site does not know at all that this argument took place, the argument is only for nginx.
Answer the question
In order to leave comments, you need to log in
Try this, haven't tested it myself but should work.
And yes, I know that if is evil :)
if ($query_string ~ "^(.*)mvx=(.*)$") {
rewrite ^(.*)$ $uri? permanent;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question