Question: how to redirect http traffic to https using an .htaccess file?
Answer: Redirect All Web Traffic. If you have existing code in your .htaccess, add the following: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
Redirect Only a Specific Domain. ... 
Redirect Only a Specific Folder.