Você tem duas opções:
Ou 1) redirecionar todos URIs que terminam com .php a /index.php , se não houver arquivo de script correspondente - adicione uma instrução try_files ao bloco location ~ \.php$ existente (consulte < href="http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files"> este documento para detalhes):
location ~ \.php$ {
try_files $uri /index.php?$args;
...
}
Ou, 2) URIs de redirecionamento que começam com /controllerPrefixng a /index.php - adicione um novo bloco location (consulte este documento para detalhes):
location ^~ /controllerPrefix/ {
rewrite ^ /index.php last;
}