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? -- Best regards Tomasz Pajor