How to redirect htt...
 
Notifications
Clear all

How to redirect https from http?

(@victoriamcnally)
Active Member

Anybody suggest me, how to redirect https from http.

Quote
Topic starter Posted : August 23, 2018 6:55 am
(@madison)
Active Member

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.

This post was modified 5 years ago by Paul Hamilton‏
ReplyQuote
Posted : August 31, 2018 8:07 am
(@jayrosen)
Active Member

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.

This post was modified 5 years ago by Nolenigius
This post was modified 5 years ago by Paul Hamilton‏
ReplyQuote
Posted : September 3, 2018 10:45 am
(@sam-j)
Active Member

To redirect http URLs to https, do the following:

<VirtualHost *:80>
ServerName www.example.com
Redirect / https://www.example.com/
</VirtualHost>…

ReplyQuote
Posted : September 13, 2018 11:47 am
Share:
Login

Welcome! Login in to your account

Remember me Lost your password?

Don't have account. Register

Lost Password
Register