try_files php

Igor Sysoev igor at sysoev.ru
Thu May 27 23:38:04 MSD 2010


On Thu, May 27, 2010 at 04:35:56PM -0300, Marcos Neves wrote:

> If we ignore the layout files, using the rewrite solution is a good one?

No. A good solution is:

    location / {
        try_files  $uri $uri/index.htm $uri.htm $uri.html @php;
    }

    location @php1 {
        try_files  $uri.php  =404;
        fastcgi_pass  ...
    }


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list