Redirect HTTP to HTTPS Using .htaccess
Editing .htaccess in cPanel ( File Manager )
Note : Backup .htaccess file befor Edit
- Login to cPanel
- Go to File Manager
- Select Setting > Enable Check “Show Hidden Files (dotfiles)
- Now select the domain name you want to access
- look for the .htaccess file
- Edit the file
- Add Code
- Save Changes when done
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]