Some images not loading over ssl joomla

I’m having some issues trying to get the images on my website to work. Some of them are not showing over https but over http it works correctly. When I look in the google chrome page inspector I see a lot of 403 errors, but the image permisions are all set correctly. I’m using Joomla 3.8.7 and I have set it to force https: entire site. I have a free Cloudflare account with flexible ssl enabled. The website is https://boosmanpoolservice.com/

Two things stand out, but I don’t necessarily have a solution:

  1. You’re using upper and lower case in your filenames and paths. This sometimes provides inconsistent results. They should be all lowercase.
  2. The forbidden images are from the Slideshow. The first image works, but the others don’t.

Since you’re using Flexible, it could be the Force HTTPS on Joomla that’s causing the issue. Flexible means Cloudflare needs to connect using HTTP. How about turning off Joomla’s Force HTTPS, but use Cloudflare’s SSL/TLS settings page to “Always Use HTTPS” and “Automatic HTTPS Rewrites.”

One of the images, for example, is https://boosmanpoolservice.com/images/Images/Slideshow/Pool1.jpeg, which loads fine on its own but returns a 403 when requested as part of your page
image

As the error is coming from your server and not Cloudflare, I’d check the server configuration. Could you have some hotlinking protection in place?

Should I also have a page rule with automatic https rewrites?

Now that I have changed all file and folder names do lower case I’m getting image placeholders. For example here https://boosmanpoolservice.com/en/for-sale-en/for-sale-en

No need for the Page Rule, as the Crypto page already does Automatic HTTPS Rewrites.

If you change the files and folders, you’ll also need to update your site’s src URLs. That can be difficult to go through everything to fix, but can be fixed with .htaccess (from Htaccess Rewrite to redirect Uppercase to Lowercase)

RewriteEngine On
RewriteBase /

# If there are caps, set HASCAPS to true and skip next rule
RewriteRule [A-Z] - [E=HASCAPS:TRUE,S=1]

# Skip this entire section if no uppercase letters in requested URL
RewriteRule ![A-Z] - [S=28]

# Replace single occurance of CAP with cap, then process next Rule.
RewriteRule ^([^A]*)A(.*)$ $1a$2
RewriteRule ^([^B]*)B(.*)$ $1b$2
RewriteRule ^([^C]*)C(.*)$ $1c$2
RewriteRule ^([^D]*)D(.*)$ $1d$2
RewriteRule ^([^E]*)E(.*)$ $1e$2
RewriteRule ^([^F]*)F(.*)$ $1f$2
RewriteRule ^([^G]*)G(.*)$ $1g$2
RewriteRule ^([^H]*)H(.*)$ $1h$2
RewriteRule ^([^I]*)I(.*)$ $1i$2
RewriteRule ^([^J]*)J(.*)$ $1j$2
RewriteRule ^([^K]*)K(.*)$ $1k$2
RewriteRule ^([^L]*)L(.*)$ $1l$2
RewriteRule ^([^M]*)M(.*)$ $1m$2
RewriteRule ^([^N]*)N(.*)$ $1n$2
RewriteRule ^([^O]*)O(.*)$ $1o$2
RewriteRule ^([^P]*)P(.*)$ $1p$2
RewriteRule ^([^Q]*)Q(.*)$ $1q$2
RewriteRule ^([^R]*)R(.*)$ $1r$2
RewriteRule ^([^S]*)S(.*)$ $1s$2
RewriteRule ^([^T]*)T(.*)$ $1t$2
RewriteRule ^([^U]*)U(.*)$ $1u$2
RewriteRule ^([^V]*)V(.*)$ $1v$2
RewriteRule ^([^W]*)W(.*)$ $1w$2
RewriteRule ^([^X]*)X(.*)$ $1x$2
RewriteRule ^([^Y]*)Y(.*)$ $1y$2
RewriteRule ^([^Z]*)Z(.*)$ $1z$2

# If there are any uppercase letters, restart at very first RewriteRule in file.
RewriteRule [A-Z] - [N]

RewriteCond %{ENV:HASCAPS} TRUE
RewriteRule ^/?(.*) /$1 [R=301,L]

Tomorrow I will look if I can turn off hotlinking (if it is enabled). So far changing the name of the files and folders to be lower case and changing in Joomla force https to none hasn’t worked. But the strange thing is that if I copy the URL of the image and paste it in a new tab it works, but if I link to the image on the website it doesn’t.

It’s extra strange considering it’s fine in http, but not https.

I didnt think changing the case of the files would change anything. There likely is an issue with the configuration, possibly referrer related. Hence what I wrote earlier.

Sometimes this is caused by Mirage. Turn that off in Cloudflare to see if that helps.

I have turned off hotlinking and all images seem to be loading fine now! Thanks for all your replies.

This topic was automatically closed after 14 days. New replies are no longer allowed.