Welcome! Log In Create A New Profile

Advanced

Re: Updating some old "if" statements

Ian Evans
September 28, 2012 09:40PM
Thanks for the new locations!

>> Location #2:
>>
>> location ~ ^/galleries(/.*$|$) {
>> if (-f /usr/local/nginx/htdocs/pixcache$request_uri/index.html) {
>> expires 2h;
>> rewrite ^(.*)$ /pixcache$1/index.html last;
>> break;
>> }
>> rewrite ^/galleries(/.*$|$) /galleries.php?mypath=$1 last;
>> }
>>
>
> location ~ ^/galleries(?<mypath>/.*$|$) {
> expires 2h;
> try_files /pixcache$mypath/index.html /galleries.php?mypath=$mypath;
> }

I have an older PCRE with my CentOS version, so am I write in
remembering the named regex can be changed to from ?<mypath> to ?P<mypath>

Thanks again.

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

Updating some old "if" statements

Ian M. Evans September 27, 2012 03:36PM

Re: Updating some old "if" statements

Edho Arief September 28, 2012 07:16AM

Re: Updating some old "if" statements

Ian Evans September 28, 2012 09:40PM

Re: Updating some old "if" statements

Edho Arief September 28, 2012 11:48PM

Re: Updating some old "if" statements

Ian M. Evans September 29, 2012 04:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 258
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready