HTTP to HTTPS Redirection - Apache
Posted by Justin Thomas, Last modified by
Undefined index: editedstaff (./__swift/cache/99a2018850e43fc96b722079625d25a8.php:44)
Copy to clipboard:
on 16 May 2015 03:02:45 PM

By default, ResellerClub Linux Servers have the mod_rewrite module enabled. You can make use of this module to automatically redirect your visitors from HTTP to HTTPS.

Setting the HTTPS Redirection

  1. Ensure that the Digital Certificate is properly installed on your Hosting Order, and the site is resolving on


    Your site will work on or or, depending on the Common Name for which you had the certificate issued. Resolving HTTPS on anything other than this Common Name would result in a certificate name mismatch error.

  2. Create a .htaccess file under the site's directory and add the following lines to it. In case there already exists a .htaccess in your site's directory, carefully edit it to add these lines:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://<common_name>%{REQUEST_URI}

    <common_name> needs to be replaced by the Common Name for which the Digital Certificate is issued.