Hi,
I am trying to configure in nginx where I have a request which is coming like "GET /images/abc.jpg HTTP/...."I wanted to write a IF condition which should make a variable true if the request is for abc.jpg or images folder and I wanted to use that variable value in below code to do other operation.
Please let me know how I can do it.
I have tried writting some thing as below,but it doesn't help me out.
location /images/abc.jpg {
# set $test I;
set $test "${test}I";
}
location ~* \.(gif|jpg|png)$ {
set $test "${test}I";
}
if ($request_uri ~ ".*/(images)/.*") {
set $test "I";
}
Also let me know how I can print the $test value in log to verify the value.
Edited 1 time(s). Last edit at 12/23/2014 08:47PM by suvaraj.