How to redirect website http to https by htaccess
Step1 : Create .htacess fileStep2 : Write following code :
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?domain-name\.com
RewriteRule ^(.*)$ https://www.domain-name/$1 [R,L]