Convert Apache rewrite to NGinx

Francis Daly francis at daoine.org
Sun Mar 3 19:09:58 UTC 2013


On Sun, Mar 03, 2013 at 07:38:39PM +0100, GASPARD kévin wrote:

Hi there,

> >Probably a single extra try_files line will work for you.

> This is my new config file :

>         location ~ \.php$ {

>                 try_files $uri $uri/ /index.php?q=$uri&$args;
>         }

You will probably find things much easier when you fully understand what
is written at http://nginx.org/r/location

> http://doinalefort.fr/2013/hello-world/

One request is handled in one location{}. That request does not match
this location, and so will not be handled in this location.

The try_files directive should be in a location that does match --
perhaps "location / {}".

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list