Welcome! Log In Create A New Profile

Advanced

Re: location question

September 03, 2009 05:44AM
On Thu, Sep 03, 2009 at 01:20:19PM +0400, Igor Sysoev wrote:

> On Thu, Sep 03, 2009 at 11:14:17AM +0200, Tomasz Pajor wrote:
>
> > I have a request:
> >
> > http://test.dev/imgheaders/<img_hash>/<img_serialize>
> >
> > What I want to achieve is, get from location <img_hash>, and check if
> > file exists, if it exists then serve the file. if file not exists pass
> > <img_serialize> to php fastcgi script and it will return the image.
> >
> > Any suggestions on how to achieve this?
>
> location ~ ^(/imgheaders/[^/]+)/[^/]$ {

- location ~ ^(/imgheaders/[^/]+)/[^/]$ {
+ location ~ ^(/imgheaders/[^/]+)/[^/]+$ {

> root ...
> try_files $1 @php;
> }
>
> location @php {
> ...
> }


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

location question

Tomasz Pajor September 03, 2009 05:36AM

Re: location question

Igor Sysoev September 03, 2009 05:36AM

Re: location question

Igor Sysoev September 03, 2009 05:44AM

Re: location question

Tomasz Pajor September 03, 2009 07:06AM

Re: location question

Tomasz Pajor September 03, 2009 08:20AM

Re: location question

Igor Sysoev September 03, 2009 08:26AM

Re: location question

Tomasz Pajor September 03, 2009 09:44AM

Re: location question

Igor Sysoev September 03, 2009 09:52AM

Re: location question

Jeff Waugh September 03, 2009 10:10AM

Re: location question

Igor Sysoev September 03, 2009 08:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 99
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready