mitch
mitch

Reputation: 113

Images not showing up with https

Suddenly, my images are not showing up on my site when accessing https pages. No change in my code. My host did have to recompile their ftp service with SSL support after my request (so I could ftpes my site). Can't thing of anything else that would affect my SSL cert. Same thing happens on FF and IE and on different computers.

Upvotes: 5

Views: 20032

Answers (4)

Kevin
Kevin

Reputation: 381

I used DJango API to test locally, everything is normal, after deploying SSL, the interface access is normal, but the picture shows 404

Upvotes: 0

A Robot
A Robot

Reputation: 11

This is an old post but, it could be hotlink protection too.

If you turn it on an allowed alias for a http:// domain you gotta for its https:// too, otherwise itll deny your images from being called to client.

Upvotes: 1

Pascal MARTIN
Pascal MARTIN

Reputation: 400972

If I go to your website ( https://www.scfootball.org/ ), I don't see the images, as you said : I get a 403 (Forbidden) error for each one of those -- I can see this using the "Net" tab of the Firefox extension Firebug, for instance.

If I try to see an image directly, without going trough the site (for instance : https://www.scfootball.org/widgets/GulloParkHeader.png ), then, I can see the image.
If you try, make sure you copy-paste the URL to a new tab/window, and not just click on it

Which means there is some kind of trouble between the website and the access to the images ; not on the images themselves.


If I disable the referer in firefox (the web developper toolbar extension allows that easily) and refresh your website's webpage, the images appear.

If I re-enable the referer, and refresh again, then the images don't appear anymore.

Which means there is something, related to the referer, that prevents the images from being sent, and returns a 403 error instead.


Just a wild guess : maybe there's a .htaccess in your widgets directory (or somewhere else) that prevents images from being served, if the referer doesn't correspond to a specific domain ?

Considering the images are displayed on the site when I access it without HTTPS (i.e. with an URL such as http://www.scfootball.org/index2.php ), maybe there is a "protection" in place so your images are not displayed if the Referer is not that non-https website... And that "protection" has not been updated when you switched to HTTPS ?

(I've seen that kind of "protection" used to prevent hot-linking of images, for instance)

Upvotes: 12

Michael Lorton
Michael Lorton

Reputation: 44386

Yeah, "not showing up" is a little vague. If the HTML is served by HTTPS and the images are still being served by HTTP, there's a little security leak inherent in the page, which your browser may deal with in one of several, largely ineffectual, ways.

Upvotes: -1

Related Questions