How to force SSL with .htaccess
- 04/08/2018 2:16 PM
You can force an HTTPS connection on your website by adding these rules in your website's .htaccess file:
1 2 3 |
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
You can create or edit the .htaccess file either via FTP, or using with the File Manager available in cPanel.
Add Comment