How to redirect HTTP to HTTPS Using .htaccess. Print

  • 0

Step 1: Log in to cPanel.

Step 2: In the FILE section of cpanel there is one option for File Manager, click file manager.

Step 3: Go to the Public_html directory and find the .htaccess file.

Step 4: Paste below code in .htaccess file.

 

RewriteEngine On

RewriteCond %{HTTP:X-Forwarded-Proto} !https

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Step 5: Click on save Changes.


Was this answer helpful?

« Back