What is the right way to redirect all traffic to HTTPS?
Number 1 If you want your website to be ONLY accessible through HTTPS, you will want to add this piece of code to your .htaccess file, replacing your domain’s name: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] </IfModule> This will redirect any visits from non-SSL to SSL version of your website. … Read more