VPS侦探论坛

 找回密码
 注册
查看: 2756|回复: 1

lnmp的codeigniter.conf伪静态有误

[复制链接]
发表于 2020-6-8 08:57:40 | 显示全部楼层 |阅读模式

location / {
try_files $uri $uri/ /index.php;
}
应该改成:
location / {
try_files $uri $uri/ /index.php?$args;
}
原因:在ng环境下,我用来做API,原伪静态没法接收到request,post,get这些参数

美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2020-6-8 09:40:19 | 显示全部楼层


收到,按 https://codeigniter.com/user_guide/general/urls.html 官网这样写更好点
  1. location / {
  2.         try_files $uri $uri/ /index.php$is_args$args;
  3. }
复制代码
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-21 17:36 , Processed in 0.025535 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表