隐藏index.phpphp
vi /usr/local/nginx/conf/vhost/虚拟主机名字.conf #注释 include enable-php.conf (或者直接dd删除) #添加 include enable-php-pathinfo.conf; #注意后面必须带分号 #在server段添加 location / { if (!-e $request_filename){ rewrite ^/(.*)$ /index.php/$1 last; } }