Nginx Map Multiple Parameter Input

rahul286 nginx-forum at nginx.us
Fri Oct 12 14:37:28 UTC 2012


Sorry for wrong question. I wanted to ask...

map "~ ^/~([^/]*)/.*$)" $userhome{
} 

style regex. Where map input  string will be $1.

===

Apart from that, inside map:

map $uri $blogname{
       ~^(?P<blogpath>/[^/]+/)files/(.*)$      $blogpath ;
}

I am not able to use $1. I always have to use a variable like $blogpath. Is
it by design or a mistake on my end?

I get error: "nginx: [emerg] unknown "1" variable" when I try:

map $uri $blogname{
       ~^(/[^/]+/)files/(.*)$      $1 ;
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,231715,231725#msg-231725



More information about the nginx mailing list