On 05 Aug 2014, at 15:11, Pankaj Kaushik <dev.panky2...@gmail.com> wrote:
> Hey Roman, > > I do not actually get the idea how to use map in below scenario. > > Suppose i have two form of uri as mentioned below:- > > URI 1 : http://abc.10.23.32.22:2000/testFile > > URI 2 : http://10.20.32.23:2000/def/testFile > > So i want to fetch out following substring from above mentioned URI's as a > key :- > > Key 1 : abc > > Key 2 : def > Here’s an example for the second case map $uri $key2 { ~^(?<key>/[^/]+)/ $key; default ""; } Now you can use $key2 in the “hash” directive. _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel