lnmp启用pathinfo并隐藏index.php
编辑如下区段:
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;}
location ~ [^/]\.php
#try_files $uri =404;
include pathinfo.conf;
location /{ if (!-e $request_filename) { rewrite "^/(.*)$" /index.php last; }}
service nginx restart