nginx与apache下rewrite 报404

nginx下 /image/show 404

apache 下 /ajax/unreadMessages /ajax/unreadNotifications /ajax/unreadMessages

三个请求都是404

兼容性还要多测测调整一下,或者把开发的nginx rewrite 或者Apache rewrite写一个标准兼容的贴出来,带上版本号

apache不用贴了,pulbic下有

nginx如下

location / {
                try_files $uri $uri/ /index.php?$query_string;
        }

        # 根据laravel规则进行url重写
        if (!-e $request_filename)
        {
                rewrite ^/(.*)$ /index.php?/$1 last;
                break;
        }




请先 登录 后评论
  • 0 关注
  • 0 收藏,3036 浏览
  • Bruce 提出于 2017-08-19 21:16

相似问题