wordpress nginx clean url

location / {
index index.php index.htm index.html;

if (!-e $request_filename) {
rewrite ^.+?(/.*.php)$ $1 last;
rewrite ^ /index.php last;
}
}