Http to Https not redirecting

andrew.n

Well-Known Member
Jun 9, 2020
875
325
63
EU
cPanel Access Level
Root Administrator
Why don't you use the "Redirections" option in cPanel to setup the rule? that would be the easiest and for sure it will work! :)
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
9,686
1,511
313
cPanel Access Level
Root Administrator
Hey there! I've had good luck with using the following for redirection for many years, so you may want to try this:

Code:
RewriteCond %{HTTP_HOST} ^domain.com
RewriteCond %{HTTP_HOST} !^domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
RewriteCond %{SERVER_PORT} !443
RewriteRule (.*) https://www.domain.com/ [R]
You could also use the redirection tool that @andrew.n mentions.
 
Thread starter Similar threads Forum Replies Date
I Miscellaneous 9