I have SSL enabled on server for my website which is built in wordpress and I'm trying to force to redirect the whole website to HTTPS from httaccess file. To do this I made changes in .htaccess file. But it gives issue of "The page isn't redirect properly". The code I have used in htaccess file is given below:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress