Gm Prodigy

Registered
May 8, 2018
1
0
1
uk
cPanel Access Level
Website Owner
I've set up a forum and got the force ssl for my site working by using

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>

It also forces ssl for subdomains created by me. The only problem I have is that it doesn't work for cpanel.example.com. all of my subdomains has forced ssl but the cpanel subdomain doesn't. Any thoughts on this?

2018-05-08 (1)_LI.jpg
 
Last edited by a moderator:

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,

It also forces ssl for subdomains created by me. The only problem I have is that it doesn't work for cpanel.example.com. all of my subdomains has forced ssl but the cpanel subdomain doesn't. Any thoughts on this?
The code that you are using is for the account specific and is used in the .htaccess of the particular account and this .htaccess may not override the global configuration set for proxy subdomains. You will have to change the proxy subdomain behavior from the tweak settings section only..
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Both of the responses to this are exactly what I would suggest as well. Please let us know if you continue to have issues with the proxy subdomains over SSL. You'll want to ensure the following are set to on in WHM>>Server Configuration>>Tweak Settings:

Choose the closest matched domain for which that the system has a valid certificate when redirecting from non-SSL to SSL URLs. Formerly known as “Always redirect to SSL/TLS”
Require SSL for cPanel Services
 

Lillike

Well-Known Member
May 29, 2018
46
2
8
Hungary
cPanel Access Level
Root Administrator
Hello,

I have already prepared above settings (redirection via WHM Tweak Settings) but the redirection does not work. I have let's encrypted AutoSSL. And AutoSSL does working.

Please, advice.

Thanks.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.


Thanks!
 

Lillike

Well-Known Member
May 29, 2018
46
2
8
Hungary
cPanel Access Level
Root Administrator
Hello, Lauren,

Redirection setup is via WHM Tweak Settings.
But the redirection does not work.

My first thread in this case: - Merged Threads -

Support ticket: 12158423
 
Last edited by a moderator: