Kohana 网站的 SSL

标签 ssl kohana kohana-3

我在 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/

相关文章:

azure - clientCredentialType ="Certificate"之后出现错误

ssl - 远程证书签名

php - 在 PHP 网站上实现 SSL 的基础知识

cordova - 使用 Edge(使用 Cordova)、signalr 和 OWIN self 主机建立 HTTPS 连接的问题

php - 验证错误消息

javascript - 如何使用Ajax上传多张图片?

php - Kohana 框架 : 'HTTP_Exception_404 [ 404 ]: The requested URL welcome/index was not found on this server.'

php - 什么是 HMVC 模式?

validation - Kohana 3.0 中的自定义验证错误消息

php - Kohana 3 ORM 中的嵌套关​​系