HOSTING KB | HOSTING A/C LOGIN | MY iNFOTYKE LOGIN | SEO TOOLS | BLOG | CONTACT US
Knowledgebase
Help Desk - iNFOTYKE > Help Desk - iNFOTYKE > Knowledgebase

Search help:


HTTP to HTTPS Redirection - Apache

Solution

By default, iNFOTYKE 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

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.

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.

 
Was this article helpful? yes / no
Related articles HTTP to HTTPS Redirection - Apache
HTTP to HTTPS Redirection - IIS
Locations of Common Log Files on cPanel Servers
Locations of Common Log Files on cPanel Servers
Optmods for EasyApache
Article details
Article ID: 16
Category: VPS
Views: 91
Rating (Votes): Article not rated yet (0)

 
« Go back