try-files and Gallery3 rewriting

Andreas Lehr mail at andreas-lehr.com
Thu Jun 9 01:43:16 MSD 2011


Hiho,

I am currently running gallery3 on nginx/php-fpm. Works like a charm so far.
But i'd like to get gallery3 also under the hood of try-files, but didn't
get it running up to now.

The working (and evil) if rewrite code looks like this:

     location /gallery3/ {
                if (!-e $request_filename) {
                     rewrite ^/gallery3/index.php/(.+)$
/gallery3/index.php?kohana_uri=$1 last;
                     rewrite ^/gallery3/(.+)$
/gallery3/index.php?kohana_uri=$1 last;
                     rewrite ^/gallery3/$ /gallery3/index.php?kohana_uri=/
last;
                }

        }

Could anybody supply a correct try_files directive and explain how and why
try_files should do the stuff in this case?

Thank you very much!

Andy
-- 

Andreas Lehr

mail: mail at andreas-lehr.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110608/dd31a6bb/attachment.html>


More information about the nginx mailing list