Redirect HTTP to HTTPS automatically with Linux-based and Windows. Using the following code in your .htaccess (Linux & cPanel) and web.config (Windows) file automatically redirects visitors to the HTTPS version of your site.
Linux & cPanel: Linux-based accounts use .htaccess files to handle redirection.
RewriteEngine On
RewriteC [...]