Https – echo js ore css

Hello,
I have a problem using https:
c::set('ssl',true);

but

<?php echo css('assets/css/somecss.css') ?>

still generates "http://url..."
Is it better to wright a relative path on my own like:
<link rel="stylesheet" href="//url.tld/assets/css/somecss.css">

No, that is not necessary. If your website is https, then the CSS helper should output the correct protocol. What you could try is setting the URL in your config as well.

c::set('url', 'https://domain.com');

But this should not be necessary.

The css helper will however only generate the correct protocol if your website is really available under https.

1 Like

Thanks again,
that was the problem : the url was set in my config as http://… even though, it wasn’t necessery! :slight_smile: