Answer the question
In order to leave comments, you need to log in
How to escape such request?
We need requests that fall under the condition:
mysite.com/index.php?r=test
were proxied
to another server
But for some reason it doesn’t work
like this:
location ^/index\.php\?r=test\/$ {
neither like this:
location ^ /index.php?r=test/$ {
not like this:
location ~ ^/index.php?r=test/$ {
Please tell me how to register correctly and what could be the problem.
Thank you!
Answer the question
In order to leave comments, you need to log in
Location directives do not work with URL parameters in nginx.
You can try like this:
location ^/index\.php$ {
if ($query_string ~ "r=test") {
proxy_pass ...
}
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question