Hello everyone,
I just noticed that "If" can only be used in very limited situations. It is far from the first impression it gave to me. So I did some code reading and found the reason. After adding NGX_HTTP_LIF_CONF flag to ngx_command_t "if", it worked. Then I can write some more complex rule set.
But I just wandering whether this could bring any consequence -- such as make nginx unstable or bring performance penalty?
Any clue will be appreciated.