1

Well, I am utterly stumped at this point. I have a site (www.smithfieldtimes.com). It is based on joomla, and I am trying to enable HTTPS on the site. Almost all the links in the template and the links used in the articles are relative.

However for some reason the images won't display. At first I thought it was a mixed content issue, but of course I am not using hard links anywhere. I then used .htaccess to force image files to be https. So now the mixed content warning is gone, but the images still aren't showing up.

The thing is, the links aren't broken. If you right click on the images and choose "Open image in new tab" the image loads fine. Same with all the image URLs reported in firebug and Chrome dev tools.

Is there any reason that the images wouldn't load if the URLs are correct? This is what my .htaccess file looks like:

RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://smithfieldtimes.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://smithfieldtimes.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.smithfieldtimes.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.smithfieldtimes.com$ [NC] RewriteRule .*\.(jpg|jpeg|gif|png|bmp|pdf)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,NC,R=301]

Everything works fine on the non HTTPS site. Any suggestions or tips for even what to look for at this point would be greatly appreciated.

1
  • Can you give us a link specifically to an article not loading images. I just hit your URL and all of the images are loading for me. You may want to check your browser cache, but everything on my end looks good.
    – Terry Carter
    Mar 18, 2016 at 19:51

1 Answer 1

1

So, I actually solved it. It was something pretty basic in that I was getting too many redirect loops. I added the line "RewriteCond %{HTTPS} !=on" right before my last rewrite rule. That way it wouldn't "re-process" an HTTPS get request. A bit obvious an staring me in the nose earlier... but hey, everything seems to be working now. I am not sure if this is in fact the best/proper way, but it seems to work.

Thanks. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.