XF 1.5 Issue with Relative css url on HTTPS site

sajal

Active member
I've just setup SSL on my site. But, I've problem with relative URLs, browser blocks loading "css.php" kind of CSS in my page that's breaking layout.

For example,

<link rel="stylesheet" href="css.php?css=uix,<xen:if is="@uix_cssTemplate">@uix_cssTemplate</xen:if>&amp;style={xen:urlencode $_styleId}&amp;dir={$visitorLanguage.text_direction}&amp;d={$visitorStyle.last_modified_date}" />

I believe if there's https in my browser above css should be loaded using HTTPS.

But, it's not happening, it's trying to load it via HTTP (Firebug shows that), and thus blocked by browser, breaks the page layout.

Any ideas?
 
I note that you seem to be running over CloudFlare so it seems to be something related to the web server configuration that isn't detecting that, oe CloudFlare not requesting your site over HTTPS. Your base href is being detected as http:// so any requests for relative resources are effectively http://... rather than https://...

As well as updating the board URL as above, you should try to resolve this issue between CloudFlare and your site. If there's absolutely no way of resolving that, you can try adding the following to config.php:

PHP:
$_SERVER['https'] = on;
 
Back
Top Bottom