SSL error

Hebu_n

Active member
Registered
Joined
Jan 13, 2020
Messages
29
Points
13

Reputation:

Hi guys I hope you all re doing great so guys I have this problem, I am having SSL cetificate it works fine an I did al forwarding it also works fine
for example when I tiype http://www.example.com it redirects to the https://www.ezaple.com as well if i just do www.eacmple.com it again it goes to the https
but when ever i thype example.com the SSL doesn't work I don/t know why

i have the needed codes in the htaccess. any help
 

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
20,162
Points
823

Reputation:

Hi guys I hope you all re doing great so guys I have this problem, I am having SSL cetificate it works fine an I did al forwarding it also works fine
for example when I tiype http://www.example.com it redirects to the https://www.ezaple.com as well if i just do www.eacmple.com it again it goes to the https
but when ever i thype example.com the SSL doesn't work I don/t know why

i have the needed codes in the htaccess. any help
Hebu_nadd .htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
 

askub

Member
Registered
Joined
Jan 29, 2020
Messages
22
Points
13

Reputation:

are using a webhosting , dedicated server or a vps?
 

askub

Member
Registered
Joined
Jan 29, 2020
Messages
22
Points
13

Reputation:

try changing the php version to 7.4 in webhosting cpanel, and see if you have activated any redirects in the domain
 
Last edited:

askub

Member
Registered
Joined
Jan 29, 2020
Messages
22
Points
13

Reputation:

@Hebu_n
Add the following to the top of your .htaccess file.
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
 
Top