By default, the .php extension will show in a web browsers address bar. For example, if you've a page named About.php, the address bar will show www.example.com/About.php.
Ensure your /etc/nginx/nginx.conf file has the following.
location / {
try_files $uri $uri/ @extensionless-php;
index index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location @extensionless-php {
rewrite ^(.*)$ $1.php last;
}
Now, .php will no longer be displayed.