Anybody suggest me, how to redirect https from http.
1. Log into cPanel.
2. Click the File Manager icon.
3. At the top right, click the Settings button.
4. Check the Show Hidden Files (dotfiles) box and click Save
5. Now you have to locate the .htaccess file for the site you want to apply the redirect to. In most cases, it will be located in the public_html folder so we will double click that.
6. Now you have to locate the .htaccess file for the site you want to apply the redirect to. In most cases, it will be located in the public_html folder so we will double click that.
7. From here, find your .htaccess file, right click it and click Edit
8. Now at the top of the file, copy and paste the following code:
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http: //%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Like so.
A simple and effective solution is to force a 301 redirect on the homepage of your website from HTTPS to HTTP. We can achieve that with very little code, 2 lines to be exact. To redirect your homepage from HTTPS to HTTP add these lines to your .httaccess or the httpd.conf file:
#Redirect your Homepage from HTTPS to HTTP
RewriteCond %{HTTPS} on
RewriteRule ^$ http: //%{HTTP_HOST} [L,R]
The main reasons why these lines work best:
Easy copy and paste into any apache configuration file (as long as mod-rewrite is turned on). It will work for any domain name. With ‘www’ or without, etc. Is restricted to only affect the homepage, hence lowering the likelihood of other issues popping up when you are running larger websites or advanced frameworks like Magento or WordPress.
To redirect http URLs to https, do the following:
<VirtualHost *:80>
ServerName www.example.com
Redirect / https://www.example.com/
</VirtualHost>…