替朋友解决一个问题,有偿技术支持, 200 元预算

2016-09-04 00:31:24 +08:00
 figol
http://*****.com/index.php/member/home 404 错误
http://*****.com/?/member/home 正常
网站是 PHP 写的, nginx 做为服务器, php-fpm , index: index.php ;
index.php 是唯一入口文件, member 对应是 module name , home 对应 action name ;

nginx 该如何配置,避免 http://*****.com/index.php/member/home 404 错误
有兴趣的直接留 QQ 或是 WECHAT ;
3854 次点击
所在节点    程序员
10 条回复
RoundCat
2016-09-04 00:40:53 +08:00
我猜是 ci 框架吧?
piku
2016-09-04 00:41:04 +08:00
我建议你试试 http://*****.com/index.php?/member/home
geeglo
2016-09-04 00:42:23 +08:00
企鹅 2530668873
mjVtb96d2bap2u3Z
2016-09-04 00:44:34 +08:00
你就直接说什么框架吧, thinkphp ?
lemontv
2016-09-04 00:53:27 +08:00
taozywu
2016-09-04 09:04:58 +08:00
企鹅 3079520070
laoyuan
2016-09-04 09:45:20 +08:00
正确姿势难道不应该是这样么
http://*****.com/member/home
yangg
2016-09-04 11:23:47 +08:00
用的 rewrite 吧?换成 try_files $uri $uri/ /index.php?$query_string
figol
2016-09-04 14:00:36 +08:00
感谢 @码代码的女孩子,已经帮我解决了问题;
zuotech
2016-09-05 10:53:16 +08:00
@figol 码代码的女孩子 你真是女孩子吗 哈哈

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/303748

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX