TPR
TPR

Reputation: 2577

https - ssl - relative path approach not working?

I am using a master page layout etc, so all the pages have some parts of it coming from one master page or another.

Now, checkout is one of these pages, and it needs to be secure. In my master page, I am using relative path to images and Url's, and these images end up with "http". I thought that if I am using relative path, my master page AND css file automatically use https instead of http if the page is secure? Apparently it does not, when I right click on an image, it still has "http" instead of "https" ans same goes for URL path.

Upvotes: 2

Views: 4705

Answers (2)

hyprsleepy
hyprsleepy

Reputation: 1810

When the images come back as http are you checking this from your local dev or production? I thought I had this problem before but then realized my dev environment was always http and that the relative path would work in production because there it would be https.

Upvotes: 1

John Paulett
John Paulett

Reputation: 15824

Check out this great article by Ned Batchelder which shows schema relative URLs:

<img src='//fast.cdn.net/pix/smiley.jpg' />

Upvotes: 5

Related Questions