4 posts by 3 authors in: Forums > CMS Builder
Last Post: October 10, 2017   (RSS)

I am having an issue I hope someone can help me with. 

I am requiring HTTPS for CMSB (Only allow users to login via secure HTTPS connections). It is working fine. However when a user clicks on a Preview button for a section, the page preview link is sent as HTTPS as well and the CSS, JS, and other related files are evidently not being linked. As a result the page is straight HTML with no styling. What do I need to do here??

Your help is appreciated!


By Zicky - October 9, 2017 - edited: October 9, 2017

A question.

How are you linking your site pages to your CSS style sheets?

For example are linking to your CSS like:

<link href="http://yourdomain.com/css/styles.css" rel="stylesheet" />


<link href="https://yourdomain.com/css/styles.css" rel="stylesheet" />


<link href="/css/styles.css" rel="stylesheet" />


<link href="css/styles.css" rel="stylesheet" />

The sites I've been building use either HTTPS or HTTP. In either case I link to the CSS style sheets to my site pages using the method shown below, and "Preview" works for me regardless of https or http:

<link href="css/styles.css" rel="stylesheet" />

Hope this helps,


And to add to what Zicky shared, you can actually remove the http: or https: part (called the "scheme") and use an url like this: 

<link href="//yourdomain.com/css/styles.css" rel="stylesheet" />

And it will use whatever scheme (http: or https:) you're already on.

Let me know if that solves it or if you continue to have issues. 

Dave Edis - Senior Developer