PHP实现yii项目转发有哪几种方法?

  1.  header("location: index.php"); 如果header后面有代码, 会执行, 如果不想执行, 则加上exit;或者die();等, 应该可以应用到yii项目转发, 访问一个页面跳转到yii项目, 没有试过, 有时间验证一下.
  2. proxy_pass来实现yii项目转发, 只需要配置proxy_pass能访问到yii项目的入口文件index.php即可.
  3. 配置nginx的proxy_pass访问rubbish.test.com转发到quick.test.com, nginx的proxy_pass之所以会丢失post参数, 现在看来应该是因为转发给了外部url, 而不是内部转发, 内部转发的时候, 并没有丢失?

猜你喜欢

转载自www.cnblogs.com/bneglect/p/11814283.html