http-to-https-with-htaccess

How do I Force my Website to use SSL?

Last modified: February 20, 2019 and is filed under Hosting

What is htaccess ?

htaccess is a configuration file for use on web servers running the Apache Web Server software.

Forcing all website traffic to use HTTPS

Use the following code in your .htaccess file

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

Forcing a specific domain to use HTTPS

RewriteEngine On 
RewriteCond %{HTTP_HOST} ^abcd\.com [NC]
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.xyz.com/$1 [R,L]

 

Common htaccess Rules

Tags: ,

supercharge your online presence today!

we understand all aspects of internet strategy but focus on design, development, and Digital marketing. We can make high-quality custom Solution with affordable price.

+ 91 9745320424 mail@arulmjoseph.com

arul joseph