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