Welcome! Log In Create A New Profile

Advanced

Re: Nginx getting last variables on exploded uri

March 15, 2014 01:44PM
On Mar 15, 2014, at 21:30 , gokhanege wrote:

> Where is the problem? I cound not found it.
>
> My uri is :
>
> /rdev/4/0/9/2/3/2/409232-750-0-257506-supra-ayakkabi-resimleri.jpg
>
> Nginx conf is :
>
> if ($request_uri ~* "/rdev/(.*)-(.*)-(.*)-(.*)\.jpg$") {
> set $exp1 $1;
> set $exp2 $2;
> set $exp3 $3;
> set $exp4 $4;
> }
> add_header out_head1 $exp1;
> add_header out_head2 $exp2;
> add_header out_head3 $exp3;
> add_header out_head4 $exp4;
>
> Header Output :
>
> out_head1: 4/0/9/2/3/2/409232-750-0-257506
> out_head2: supra
> out_head3: ayakkabi
> out_head4: resimleri
>
> I want to :
>
> out_head1: 4/0/9/2/3/2/409232
> out_head2: 750
> out_head3: 0
> out_head4: 257506-supra-ayakkabi-resimleri
>
> Thanks.

location ~ ^/rdev/(?<EXP1>[^-]+)-(?<EXP2>[^-]+)-(?<EXP3>[^-]+)-(?<EXP4>.+)\.jpg$ {
...
}


--
Igor Sysoev
http://nginx.com
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx getting last variables on exploded uri

gokhanege March 15, 2014 01:30PM

Re: Nginx getting last variables on exploded uri

Igor Sysoev March 15, 2014 01:44PM

Re: Nginx getting last variables on exploded uri

gokhanege March 15, 2014 02:11PM

Re: Nginx getting last variables on exploded uri

Jonathan Matthews March 15, 2014 01:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 57
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