Welcome! Log In Create A New Profile

Advanced

Re: Nginx Map Multiple Parameter Input

October 12, 2012 10:44AM
On Oct 12, 2012, at 18:37 , rahul286 wrote:

> Sorry for wrong question. I wanted to ask...
>
> map "~ ^/~([^/]*)/.*$)" $userhome{
> }
>
> style regex. Where map input string will be $1.

No. "map" is not "location".

> ===
>
> 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 ;
> }

Digit captures are not supported in map. You have to use named capture.


--
Igor Sysoev
http://nginx.com/support.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx Map Multiple Parameter Input

rahul286 October 12, 2012 08:26AM

Re: Nginx Map Multiple Parameter Input

Igor Sysoev October 12, 2012 08:58AM

Re: Nginx Map Multiple Parameter Input

rahul286 October 12, 2012 09:14AM

Re: Nginx Map Multiple Parameter Input

Igor Sysoev October 12, 2012 09:48AM

Re: Nginx Map Multiple Parameter Input

rahul286 October 12, 2012 10:21AM

Re: Nginx Map Multiple Parameter Input

Igor Sysoev October 12, 2012 10:26AM

Re: Nginx Map Multiple Parameter Input

rahul286 October 12, 2012 10:37AM

Re: Nginx Map Multiple Parameter Input

Igor Sysoev October 12, 2012 10:44AM

Re: Nginx Map Multiple Parameter Input

rahul286 October 12, 2012 10:51AM

Re: Nginx Map Multiple Parameter Input

Igor Sysoev October 12, 2012 10:56AM

Re: Nginx Map Multiple Parameter Input

rahul286 October 12, 2012 11:14AM

Re: Nginx Map Multiple Parameter Input

Igor Sysoev October 12, 2012 01:20PM

Re: Nginx Map Multiple Parameter Input

rahul286 October 13, 2012 12:17PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 123
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready