location / { try_files $uri $uri/ @extensionless-php; }
location ~ \.php$ { if ($request_uri ~ (.*)\.php$) { return 301 $1; }
include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.0-fpm.sock; }
location @extensionless-php { rewrite ^(.*)$ $1.php last; }
|