Forcing HTTPS using .htaccess Post author:konnectcraft Post published:December 4, 2017 Post category:linux Post comments:0 Comments In order to force HTTPS to all web traffic, insert the following code into your .htaccess file in the root directory of your domain. RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] Please Share This Share this content Opens in a new window Opens in a new window Opens in a new window Opens in a new window You Might Also Like Mute Console Beeps in Kali November 27, 2017 Advantages of using a Managed Service Provider April 22, 2023 BASH clear history December 18, 2017 Leave a Reply Cancel replyYou must be logged in to post a comment.