隱藏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; } }