Force HTTPS with .htaccess

November 17, 2018 | 12:19 PM

Bunnbuns


Create an htaccess file or open your existing one (if you already have one).

Copy and paste the following code above everything in the file.

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

Great job! You should have all pages on your site in https! If you have any problems post a comment below.


0 Comments