V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
figol
V2EX  ›  程序员

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

  •  
  •   figol ·
    figol · 2016-09-04 00:31:24 +08:00 · 3812 次点击
    这是一个创建于 2798 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 ;
    10 条回复    2016-09-05 10:53:16 +08:00
    RoundCat
        1
    RoundCat  
       2016-09-04 00:40:53 +08:00 via Android
    我猜是 ci 框架吧?
    piku
        2
    piku  
       2016-09-04 00:41:04 +08:00
    我建议你试试 http://*****.com/index.php?/member/home
    geeglo
        3
    geeglo  
       2016-09-04 00:42:23 +08:00
    企鹅 2530668873
    ali727
        4
    ali727  
       2016-09-04 00:44:34 +08:00 via Android
    你就直接说什么框架吧, thinkphp ?
    lemontv
        5
    lemontv  
       2016-09-04 00:53:27 +08:00
    taozywu
        6
    taozywu  
       2016-09-04 09:04:58 +08:00
    企鹅 3079520070
    laoyuan
        7
    laoyuan  
       2016-09-04 09:45:20 +08:00
    正确姿势难道不应该是这样么
    http://*****.com/member/home
    yangg
        8
    yangg  
       2016-09-04 11:23:47 +08:00
    用的 rewrite 吧?换成 try_files $uri $uri/ /index.php?$query_string
    figol
        9
    figol  
    OP
       2016-09-04 14:00:36 +08:00
    感谢 @码代码的女孩子,已经帮我解决了问题;
    zuotech
        10
    zuotech  
       2016-09-05 10:53:16 +08:00
    @figol 码代码的女孩子 你真是女孩子吗 哈哈
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2167 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 02:21 · PVG 10:21 · LAX 19:21 · JFK 22:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.