https redirect issue

Hi my query is this I am facing https redirection for my site.
http://www.example.com/ then site is not redirect .https://www.example.com/.
but if type http://example.com/ Then its working and redirect https://www.example.com/

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule

Read more here:: https redirect issue

Leave a Reply

Your email address will not be published. Required fields are marked *