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 Enable or Disable GUI on Kali 2+ November 27, 2017 CentOS/RHEL Networking Configuration August 21, 2018 installing X server on CentOS 7 minimal August 28, 2018 Leave a Reply Cancel replyYou must be logged in to post a comment.