I have a wordpress website with ssl implemented. The website is working properly at https://domain.com. I want to redirect all the traffic from http://domain.com to https://domain.com. I googled about this and changed my .htaccess to following:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# BEGIN WordPress
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
The redirection is not working. I have tried plugins like Easy HTTPS redirection, Wordpress HTTPS, etc but still it is not working. Can someone please help me out on this. Also i would like to add that when I try to visit http://domain.com it does not connect. Thanks in advance.