[SOLVED] Can't force https after migrating a site to Joomla 4 Topic is solved
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Intern
- Posts: 54
- Joined: Wed Jun 10, 2009 7:51 am
[SOLVED] Can't force https after migrating a site to Joomla 4
Hello all,
I have been running a Joomla 3 website for a long while now.
I recently migrated and tested this Joomla 3 website to Joomla 4 "offline" and had the complete stuff ready to move live, which I did today with Akeeba. Everything runs smoothly, except that I just cannot force https on both admin and site.
The certificate is there, checked everything with whynopadlock and everything passes except ForceHTTPS. Adding rewrite params to .htaccess does not change anything.
Suprisingly enough, when I launch the website in Firefox for instance, it redirects to https, but it's not true when using Edge for instance...
I have checked the database, looking for mixed content such as http images but found none, just links to external http websites but I don't believe this is harmful....
Could anyone give me some hints on what may happen here as I'm not a real htaccess/Apache guru?
Thanks much
Philippe
I have been running a Joomla 3 website for a long while now.
I recently migrated and tested this Joomla 3 website to Joomla 4 "offline" and had the complete stuff ready to move live, which I did today with Akeeba. Everything runs smoothly, except that I just cannot force https on both admin and site.
The certificate is there, checked everything with whynopadlock and everything passes except ForceHTTPS. Adding rewrite params to .htaccess does not change anything.
Suprisingly enough, when I launch the website in Firefox for instance, it redirects to https, but it's not true when using Edge for instance...
I have checked the database, looking for mixed content such as http images but found none, just links to external http websites but I don't believe this is harmful....
Could anyone give me some hints on what may happen here as I'm not a real htaccess/Apache guru?
Thanks much
Philippe
Last edited by toivo on Sat Jul 30, 2022 9:28 pm, edited 2 times in total.
Reason: mod note: moved from 4.x Installation
Reason: mod note: moved from 4.x Installation
- Per Yngve Berg
- Joomla! Master
- Posts: 30945
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Can't force https after migrating a site to Joomla 4
Check these in configuration.php
Code: Select all
public $live_site = '';
public $force_ssl = 2;
-
- Joomla! Intern
- Posts: 54
- Joined: Wed Jun 10, 2009 7:51 am
Re: Can't force https after migrating a site to Joomla 4
[SOLVED]
I'm sorry...This is a non issue...I just had to clear the cache coming from my so-called "offline" test install...
Thanks for checking out!
Cheers
Philippe
I'm sorry...This is a non issue...I just had to clear the cache coming from my so-called "offline" test install...
Thanks for checking out!
Cheers
Philippe
- Per Yngve Berg
- Joomla! Master
- Posts: 30945
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: [SOLVED] Can't force https after migrating a site to Joomla 4
You set the topic solved by clicking the "Accept this answer" on the post that have the answer.
-
- Joomla! Intern
- Posts: 54
- Joined: Wed Jun 10, 2009 7:51 am
Re: [SOLVED] Can't force https after migrating a site to Joomla 4
Done...Thx...Was not totally used to mark answers :-)
-
- Joomla! Intern
- Posts: 54
- Joined: Wed Jun 10, 2009 7:51 am
Re: [SOLVED] Can't force https after migrating a site to Joomla 4
I am re-opening this message as this happened again today and I guess there is definitely an issue with migrating a website from one location to another...
Same issue as originally described: I prepared a non-https Joomla 4 website which I moved from its test to its original location using akeeba backup, restored using akeeba kickstart.
The site working fine, I then went to force https on admin and site: this led to the famous "HTTPS has not been enabled because it is not available on this server. The HTTPS connection test failed with the error: the site HTTPS version returned an invalid status code" message...
And, yet:
- the https version of the site is active and displaying ok
- the Digicert certificate is valid and active
- the website is hosted by Ionos and Ionos recommended parameters for htaccess are ok. They recommend adding RewriteCond %{SERVER_PORT} !=443 and RewriteRule ^(.*)$ https://www.website.com/$1 [R=301,L] to htaccess
Setting $force_ssl = 2 and $live_site='' to the config file is accepted but changes nothing to the result...
I have cleared all cache and still cannot force https in the Joomla 4 config...
I have googled a lot about this without being able to find a solution but it seems that I am not alone having this issue...
Any hint would be welcome
Cheers
Philippe
Same issue as originally described: I prepared a non-https Joomla 4 website which I moved from its test to its original location using akeeba backup, restored using akeeba kickstart.
The site working fine, I then went to force https on admin and site: this led to the famous "HTTPS has not been enabled because it is not available on this server. The HTTPS connection test failed with the error: the site HTTPS version returned an invalid status code" message...
And, yet:
- the https version of the site is active and displaying ok
- the Digicert certificate is valid and active
- the website is hosted by Ionos and Ionos recommended parameters for htaccess are ok. They recommend adding RewriteCond %{SERVER_PORT} !=443 and RewriteRule ^(.*)$ https://www.website.com/$1 [R=301,L] to htaccess
Setting $force_ssl = 2 and $live_site='' to the config file is accepted but changes nothing to the result...
I have cleared all cache and still cannot force https in the Joomla 4 config...
I have googled a lot about this without being able to find a solution but it seems that I am not alone having this issue...
Any hint would be welcome
Cheers
Philippe
-
- Joomla! Apprentice
- Posts: 38
- Joined: Fri Sep 05, 2008 9:17 pm
Re: [SOLVED] Can't force https after migrating a site to Joomla 4
hi Phil. did you solve the issue? because i got the same.
force https is not working. im using latest joomla 4
force https is not working. im using latest joomla 4
-
- Joomla! Intern
- Posts: 54
- Joined: Wed Jun 10, 2009 7:51 am
Re: [SOLVED] Can't force https after migrating a site to Joomla 4
Hi there,
Yes I did but I’m not really sure about who really fixed it ! I mean, I first obviously cleared the Joomla cache and the browser cache. Then, since Force https did not seem to do anything, I edited the config file to manually force https and this did not seem to have any immediate effect. And, yet, the next day, the https site was up and running. I have no idea why. Maybe one Joomla wiz will be able to explain it one day if somebody reads this thread.
Another option is that it could be related to the provider’s config but I’m not a hardware/os/middleware guy so have no clue.
Hope this will help you too!
Yes I did but I’m not really sure about who really fixed it ! I mean, I first obviously cleared the Joomla cache and the browser cache. Then, since Force https did not seem to do anything, I edited the config file to manually force https and this did not seem to have any immediate effect. And, yet, the next day, the https site was up and running. I have no idea why. Maybe one Joomla wiz will be able to explain it one day if somebody reads this thread.
Another option is that it could be related to the provider’s config but I’m not a hardware/os/middleware guy so have no clue.
Hope this will help you too!
-
- Joomla! Apprentice
- Posts: 38
- Joined: Fri Sep 05, 2008 9:17 pm
Re: [SOLVED] Can't force https after migrating a site to Joomla 4
thank you a lot for your feedback.
i just tried to edit configuration file manually too, and maybe, just maybe i found the issue.
before there was
and now i changed it to the
and it seems it works now..
so thank you again
i just tried to edit configuration file manually too, and maybe, just maybe i found the issue.
before there was
Code: Select all
public $force_ssl = '2';
Code: Select all
public $force_ssl = 2;
so thank you again
-
- Joomla! Explorer
- Posts: 449
- Joined: Sun Dec 04, 2005 7:27 pm
- Contact:
Re: [SOLVED] Can't force https after migrating a site to Joomla 4
I just had the same issue and rather than going to check the config file I tried turning off HTTPS, saving it (in Joomla configuration page) and then turning it back on and saving again. That fixed it and the site loads HTTPS again.menomoje wrote: ↑Thu Aug 24, 2023 1:14 pmthank you a lot for your feedback.
i just tried to edit configuration file manually too, and maybe, just maybe i found the issue.
before there wasand now i changed it to theCode: Select all
public $force_ssl = '2';
and it seems it works now..Code: Select all
public $force_ssl = 2;
so thank you again
In other words, if you don't want to log into your host to do it you can probably fix it from Joomla's config page.