Force SSL to Website all pages with .htaccess

If you installed SSL correctly but in some of pages not getting Green in Address bar ?
Its because of mixed content loading in you pages. Mixed content mean some resource get loaded by https and some without https. so now to get green address and forcefully apply SSL to all resource that get loaded in page you have to add following rules in your .htaccess file that set at root directory of your website hosted folder.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yourdomain.com/$1 [R=301,L]
// to handle mix content load replace by forcefull httpS

RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Are you running your website with WordPress ?

Good News, With wordpress by using Really Simple SSL — WordPress Plugins you can easily configures your website to run over https.

Scroll to Top