HTTP to HTTPS Redirection (Apache)

 

By default, Abaco Hosting 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 https://yourdomainname.com.

    Note

    Your site will work on https://yourdomainname.com or https://www.yourdomainname.com or https://subdomain.yourdomainname.com, 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.



  • 61 Users Found This Useful
Was this answer helpful?

Related Articles

How do I access cPanel?

1. Managing your Linux Hosting package through your web browsercPanel can be accessed by using...

Uploading Content to your cPanel Linux Hosting Package

To upload content to your Hosting package through an FTP client, use only FTPS on Port 21.Some...

SymLinks Settings of cPanel Linux Hosting packages

Linux Hosting packages do not support the "FollowSymlinks" option in the .htaccess file. This...

PHP Memory Limit Error

Allowed Memory Size Exhausted Errors Fatal error: Allowed memory size of 12582912 bytes...

How do I unblock port 80/443?

Go the "Client Area"Click Services> My ServicesChoose hosting plan and click on the planClick...

Powered by WHMCompleteSolution