thinkphp rewrite 报错“No input file specified.” 请教原因?

一步:先写了一个 rewrite 文件osinx.conf放在index.php的同级目录下;
二步:然后在nginx.conf里include 这个文件
location / {

        if (!-e $request_filename){
            rewrite ^/(.*)$ /index.php/$1 last;
        }            
        include     "D:/localhost/opdell/osinx.conf";
    }
    

三步:然后 修改url_model 为 rewrite模式。

结果: 访问网站,发现url是变了,从"localhost/opdell/index.php?s=home/index/index" 变成了“localhost/opdell/home”. 但是报错“No input file specified.”。 我认为,首先rewrite是生效了的,但是为什么修改后的url好像还是按照之前的兼容模式访问了系统。导致了这个错误。??

阅读 4.3k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进