location question
Igor Sysoev
is at rambler-co.ru
Thu Sep 3 13:25:38 MSD 2009
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/
More information about the nginx
mailing list