Thanks but i've already found a solution in the russian nginx forum. location ~ ^/cms/(.*)$ { try_files /webroot/cms/webroot/$1 /webroot/cms/engine/index.php; } Is what i needed. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,218819,218849#msg-218849