Support Forum

https forum url loads http:// in front of .css links

BO boborg
boborg
Member

Hi

I am testing https edition of my site and if I load my site with the https:// url and look at the source it has //: (no http://) in front of links to css and js and site loads fine. But if I load the forum site with https:// and look at the source it has http:// in frontmysiteurl and site is not loading css.

Where do I fix this?

5 Answers

New Answer

IK Ike
Ike
Member

Hey boborg,

Have you updated the forum permalink in Forum > Integration? Also have you got anything to update in Components > Login and Registration?

How are you setting up your https? Have you made changes to the wp-config file? Or are you using a plugin?

BO boborg
boborg
Member

I have activated ssl on Cloudflare and not done any redirect to https yet. 

I have followed the guide Step-by-Step How To: Enabling CloudFlare (Flexible) SSL On WordPress on https://www.icontrolwp.com/2014/10/enabling-cloudflares-universal-flexible-ssl-wordpress-without-infinite-redirect-loops/

According to number 3. in this guide I should see the site load as usual with the https before I force urls to https. Have not tried any of the https plugins yet.

The forum permalink seems grayed out and cannot be changed. Is it possible to have it set to just //digitalt.tv/forum/ without the http part?

BO boborg
boborg
Member

Actually got it working now by adding this to the wp-config

if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
    $_SERVER['HTTPS']='on';

And I could edit the sfpermalink in phpmyadmin and remove the http: part. Seems to be working.
YS Yellow Swordfish
Yellow Swordfish
Member

Really? Not heard of that method. Our only experience of people using Cloudflare is that is causes so much trouble and unreliability that they give up on it.

I will be interested to see what @mr-papa has to say when he gets back later today.

MP Mr Papa
Mr Papa
Member

I have seen that added to wp config for users that have their sites behind a proxy or a load balancer…  not sure how its related to a CDN directly…  or setting ssl for site, but glad it works…