在Nginx安装目录下找到 “conf” 文件夹下的 “vhost.conf”
在 “vhost.conf” 中有以下代码:
location / {
index index.html index.htm index.php;
#autoindex on;
}
把这段代码用以下代码代替即可:
location / {
try_files $uri $uri/ /index.php?$query_string;
}
版权声明:本文为weixin_43870916原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。