301 redirect from http to https on godady hosting does not work

clarkma

Newbie
Joined
Sep 5, 2016
Messages
40
Reaction score
4
Hi all, I own one godaddy domain and economy hosting. I use the free ssl service of cloudflare to locate http to https, but it fail to work. The http and https both are existing online. The customer told me it is impossible to work if it is not godaddy's ssl service. I also write content on htacess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.abc\.com$ [NC]
RewriteRule ^(.*)$ https://abc.com/$1 [R=301,L]

I just want to confirm one thing: the customer is right?
 
Above coding, only redirects http://www.abc.com to https://abc.com/, it will not redirect http://abc.com since that rule is not met.

Try
Code:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://abc.com/$1 [R=301,L]
Could you give me tips on how to write the right code? I am the newbie. Thank you!
 
Could you give me tips on how to write the right code? I am the newbie. Thank you!
After using the code in htacess file, the site can not open. It shows "the site has too many times of redirection"
 
After using the code in htacess file, the site can not open. It shows "the site has too many times of redirection"
How many rewrites are in your .Htaccess file currently?
 
Try replacing above code with the following, this forces https but does not redirect the rest of the url

Code:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
 
If you entered everything correctly on your end, sounds like it is problem on their end and you are at the mercy of their "customer service" . Lord. help you. But seriously they have to fix it on their end it sounds like
 
It must be an issue on your server, not just only with your account.
Better contact them and ask for the help with solving this.
 
Back
Top