lnmp的codeigniter.conf伪静态有误
location / {try_files $uri $uri/ /index.php;
}
应该改成:
location / {
try_files $uri $uri/ /index.php?$args;
}
原因:在ng环境下,我用来做API,原伪静态没法接收到request,post,get这些参数
收到,按 https://codeigniter.com/user_guide/general/urls.html 官网这样写更好点
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
页:
[1]