Solved

HTTPS not displaying images

Posted on 2006-06-13
3
326 Views
Last Modified: 2007-02-12
I recently loaded an ssl cert on my server.  When I load my pages in Mozilla using HTTP everything loads fine, but when I load through HTTPS the pages load fine, but the images all return 404 errors.  I've tried relative linking and absolute linking of the images through http://www.mywebsitename.com/; https://www.mywebsitename.com; and www.mywebsitename.com, but no luck.
Note:  Loading the page in Internet Explorer brings up a dialog stating that the page contains mixed content and asks if I want to display the non-secure items.  If yes is selected the images still don't show up.
0
Comment
Question by:IVIoonsail
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
recklez earned 500 total points
ID: 16895748
Make sure you are using relative paths for your images.

e.g.
If you have an image
<img src="http://www.mywebsitename.com/images/header.jpg" width="100" height="100" />

you should change that to
<img src="images/header.jpg" width="100" height="100" />

If you use an absolute path, even though you are loading the page from https that image is requested from http.
0
 

Author Comment

by:IVIoonsail
ID: 16896135
All of my image paths are relative from before I set up the https, so it's something else.  Although I double checked that, and even looked for anything like a <base href=url /> tag.  Any other ideas?
0
 

Author Comment

by:IVIoonsail
ID: 16897393
Solved it.  I had hotlink protection enabled for the server I was serving the image from.  I disabled it and it started serving my images to the https server from the http server.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A Change in PHP Behavior with Session Write Short Circuit (http://php.net/manual/en/book.session.php#116217) (Winter 2014)** With the release of PHP 5.6 the session handler changed in a way that many think should be considered a bug.  See the note …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This video teaches users how to migrate an existing Wordpress website to a new domain.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now