LNMP enable PathInfo and hide Index.php,lnmppathinfo
Edit the following sections:
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;
The 1th line should read:
Location ~ [^/]\.php
The 4th line is commented out, that is, the front plus #
#try_files $uri = 404;
Remove the comment from line 8th
Include pathinfo.conf;
Add a section above location ~ [^/]\.php]
Location/{ if (!-e $request _filename) { rewrite ' ^/(. *) $ "/index.php Last; }}
Re-start Nginx
Service Nginx Restart
http://www.bkjia.com/PHPjc/1063025.html www.bkjia.com true http://www.bkjia.com/PHPjc/1063025.html techarticle lnmp enable PathInfo and hide Index.php,lnmppathinfo Edit the following sections: Location ~ [^/]\.php (/|$) {# comment Try_files $uri =404, to enable PA Thinfo try_files $uri = 404; Fastcgi_pa ...