Enable pathinfo in lnmp and hide index. php and lnmppathinfo. Lnmp enables pathinfo and hides index. php. lnmppathinfo is edited in the following section: location ~ [^]. Php (| $) {# commenttry_files $ uri404; toenablepathinfotry_files $ uri404; fastcgi_pa lnmp enables pathinfo and hides index. php and lnmppathinfo
Edit the following section:
location ~ [^/]\.php(/|$){ # comment try_files $uri =404; to enable pathinfo try_files $uri =404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; #include pathinfo.conf;}
Change row 1st:
location ~ [^/]\.php
Comment out the first line, that is, add #
#try_files $uri =404;
Remove comments from the 8th rows
include pathinfo.conf;
In location ~ [^/] \. Php add a partition above
location /{ if (!-e $request_filename) { rewrite "^/(.*)$" /index.php last; }}
Restart Nginx
service nginx restart
Edit the region in the following section: location ~ [^/] \. Php (/| $) {# comment try_files $ uri = 404; to enable pathinfo try_files $ uri = 404; fastcgi_pa...