Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: smartmouse on June 05, 2018, 03:39:03 AM

Title: New post doesn't work if SSL is enabled
Post by: smartmouse on June 05, 2018, 03:39:03 AM
Hello, I'm using SMF 2.0.14 and I turn on SSL on my forum following this topic (https://www.simplemachines.org/community/index.php?topic=555034.0).
I have the same problem as described here (https://www.simplemachines.org/community/index.php?topic=555030.msg3934618#msg3934618) with a GIF: I can't create new posts.

I think the problem is that on new post it turns back to http, instead of keep url on https.
If i remove the rewrite rules from htaccess, I can create new posts using https url... but after I posted I see that the url is with http again.

What could be the problem?
Title: Re: New post doesn't work if SSL is enabled
Post by: Aleksi "Lex" Kilpinen on June 05, 2018, 04:28:32 AM
Have you made sure all your forum's url settings are actually using https?
What is repair_settings.php? (https://wiki.simplemachines.org/smf/Repair_settings.php)
Title: Re: New post doesn't work if SSL is enabled
Post by: GigaWatt on June 05, 2018, 05:46:21 AM
Check what Lex posted about repari_settings.php and see if the same thing happens in the default theme (Curve).
Title: Re: New post doesn't work if SSL is enabled
Post by: smartmouse on June 05, 2018, 06:49:06 PM
Thank you for your replies.
I double checked repair_settings: all link start with https.
I tried to switch to default them and even with it I get the same problem...
Title: Re: New post doesn't work if SSL is enabled
Post by: Kindred on June 05, 2018, 06:54:03 PM
what is your forum url?
Title: Re: New post doesn't work if SSL is enabled
Post by: smartmouse on June 06, 2018, 07:09:55 AM
Quote from: Kindred on June 05, 2018, 06:54:03 PM
what is your forum url?
https://goo.gl/WSm22u
Title: Re: New post doesn't work if SSL is enabled
Post by: vbgamer45 on June 06, 2018, 08:22:21 AM
If you are using prettyurls visit
https://code.google.com/archive/p/prettyurls/wikis/TroubleShooting.wiki
And follow
Links point to old domain after moving forum
Title: Re: New post doesn't work if SSL is enabled
Post by: Kindred on June 06, 2018, 09:28:11 AM
Quote from: smartmouse on June 06, 2018, 07:09:55 AM
Quote from: Kindred on June 05, 2018, 06:54:03 PM
what is your forum url?
https://goo.gl/WSm22u

please do not hide links behind shorteners when you are asked for a URL.
many of us will not click a link if we do not know where it ACTUALLY goes
Title: Re: New post doesn't work if SSL is enabled
Post by: smartmouse on June 06, 2018, 12:22:54 PM
Quote from: vbgamer45 on June 06, 2018, 08:22:21 AM
If you are using prettyurls visit
https://code.google.com/archive/p/prettyurls/wikis/TroubleShooting.wiki
And follow
Links point to old domain after moving forum

Solved! Thank you!

I post here the solution:

Links point to old domain after moving forum

This is very simple to fix, in addition to updating all the other settings with repair_settings.php, this mod has one more setting to fix. You can either manually fix the pretty_root_url setting yourself, or else create a new .php with this code:


<?php require_once(dirname(__FILE__) . '/SSI.php'); require_once($sourcedir . '/Subs-PrettyUrls.php'); updateSettings(array('pretty_root_url' => $boardurl)); pretty_update_filters(); ?>

Upload the file to the same location as your forum's SSI.php and open it with your web browser. Then don't forget to delete it!



Quote from: Kindred on June 06, 2018, 09:28:11 AM
please do not hide links behind shorteners when you are asked for a URL.
many of us will not click a link if we do not know where it ACTUALLY goes
Sorry for this. I did it to avoid my link get indexed by search engines.