How I can write a condition in the nginx config testing if a q
parameter was entered in the URL?
This doesn't work:
if ($arg_q) {
return 301 "/someurl";
}
It catches URLs like
/search?entered_search=1&q=123
But it doesn't catch URLs like
/search?entered_search=1&q=