-1

This is my .htaccess - site does redirect to HTTPS but still gives: Your connection to the site is encrypted, but Google Chrome has detected mixed content on the page. How to avoid this? Thank you.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
</IfModule>
Jenny D
  • 27,358
  • 21
  • 74
  • 110

1 Answers1

1

To add to what the above two individuals said, it may be worth your while to use relative links for anything you are hosting: "src=images/banner.jpg" instead of "src=http://example.com/images/banner.jpg"

Any offsite resources such as jquery should b eloaded over https.

But the error you are seeing is because there are resources (images/css/js) on your page that are linked via http. mod_rewrite will be unable to assist with this issue as the initial connection is still encrypted.

Daniel Widrick
  • 3,418
  • 2
  • 12
  • 26