修改 /usr/local/nginx/conf/vhost/域名.conf
if ($request_filename ~ ^/?$){
rewrite ^/?$ /index.php;
}
if (!-e $request_filename){
rewrite ^(.*)$ /$1.php;
}
lnmp restart
修改 /usr/local/nginx/conf/vhost/域名.conf
if ($request_filename ~ ^/?$){
rewrite ^/?$ /index.php;
}
if (!-e $request_filename){
rewrite ^(.*)$ /$1.php;
}
lnmp restart
本文标题:lnmp隐藏.php后缀访问
本文链接:https://www.haomeiwen.com/subject/gmmjnxtx.html
网友评论