Problems with kohana and HTTPS

159 Views Asked by At

I have changed my domain in HTTPS, but after this change my website (developed in kohana) don't work fine.

Any element (image, css, link, etc.) is in HTTP, not in HTTPS.

What is the problem?

1

There are 1 best solutions below

0
bato3 On

Look at URL::base() function. Kohana automatically detect protocol.

So, if you use some (reverse)proxy to http server, this can happen.

Or in code you have forced to use http (URL::base(), URL::site().

You can overwride this by adding application/classes/URL.php file

class URL extends Kojana_URL {
  public static function base($protocol = NULL, $index = FALSE){
    return self::base('https', $index);
  }
}