I have this small issue, basically website is running full site HTTPS, green lock on every single page. But totally randomly I have noticed that images links can be viewed in HTTP and HTTPS formats



I want to automatically redirect images links to HTTPS links when someone tries to open the HTTP version.

I have set up 301 redirect in .htaccess so that all product pages opened in HTTP, get automatically redirected to HTTPS. But for some reason, it doesn't work with links that contain an image, as noted above, you can view both version.

 RewriteEngine On
 RewriteCond %{HTTPS} !=on
 RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

Any help, highly appreciated!

Potentially this is a cause because I haven't set HTTP Strict-Transport-Security. What do you guys think?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.