Rewriting all requests to index.php

Reinis Rozitis r at roze.lv
Tue Jul 13 12:29:34 MSD 2010


You can use also the try_files ( 
http://wiki.nginx.org/NginxCoreModule#try_files ) approach:

location / {
    try_files $uri $uri/ /index.php?$args;
}


This way you can also have normal directories and static files and nginx 
will check first if they exist and if not then use the /index.php in the 
root folder.


rr 



More information about the nginx mailing list