我在 Kohana 3.0.7 中有一个网站,并且我已经购买了 SSL 证书。我已经用 https 标记了返回 pay pal 交易详细信息的成功页面。更新数据库后,我添加了以下代码 -
$this->request->redirect('business/fnc_manage');
但是这个页面是用 https 加载的,在谷歌浏览器上加载不正确。
如果我尝试如下,它会给我 500 错误 -
header("Location:"+url::base()+"business/fnc_manage");
exit();
我怎样才能摆脱这个?这是否意味着我必须确保加载的所有资源都应通过 https 提供?
如果是,那么我可能必须更改所有路径。我怎样才能为 HTML 助手做到这一点?
最佳答案
我没有尝试过,但我想说更改 bootstrap.php 中的 base_url
可能会有所帮助:
Kohana::init(array(
'base_url' => 'https://yoururlhere.com',
'index_file' => FALSE,
'charset' => 'utf-8',
'cache_dir' => APPPATH . 'cache',
'errors' => TRUE,
'profile' => Kohana::$environment !== Kohana::PRODUCTION,
'caching' => Kohana::$environment === Kohana::PRODUCTION,
));
关于Kohana 网站的 SSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14745051/