Problems Requiring HTTPS and Preview

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!

Kevin

By Mikey - 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" />

OR

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

OR

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

OR

<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,

Zicky

Thanks Dave and Zicky. I tried removing the scheme and that solved the problem. I was going to use https only on the parts of the site that needed security (forms) but ended up using it throughout anyway. 

Thanks for responding. It helped me solve things. 

Kevin