Hi,
I have a very easy way that I always use:
You can force https connection by putting this in your .htaccess BTW if you don’t have htaccess just create a .htaccess on your public folder (htdocs or what is the name of your public folder)
Enter the following code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ https://yourdomain.com/$1 [L,R=301,NC]
*Oh and BTW this will only work if you insert your certificate through a cpanel or if you have a valid ssl certificate
(Change yourdomain.com to your own domain)
You can see mine here:
If you have any questions about my version, please don’t hesitate to reply, I will reply back.