I was trying this :) map $cookie_route $dont_cache { default 1; ~*[A-Za-z0-9]+ 0; } Let me try your suggestion. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,233778,233785#msg-233785