How do I force SSL?

How do I force SSL? 2018-06-08 12:35 | Views: 818

To force SSL you need to create a file called .htaccess in your domains directory (ensure you enable hidden files), then insert the following code;

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

If you already have a .htaccess file, paste the code at the very start and make sure that you don't repeat the first line.


What are you looking for?


Processing Your Request. Please Wait...