Our FamilyForum

Our FamilyForum Welcome Center => Chit Chat & Humor => Computers & Internet => Topic started by: Skhilled on May 05, 2017, 04:28:39 PM

Title: How To Force HTTP to HTTPS
Post by: Skhilled on May 05, 2017, 04:28:39 PM
First, you must have a SSL certificate installed! I highly suggest Let's Encrypt...it's free!!! If your hosting does not already have it installed ask them to install it.

https://letsencrypt.org/

Even if you have a SSL installed, you and your visitors can still view the HTTP part of your site. To prevent this, you can create a .htaccess file and put it in your root directory where your domain resides. You should add the following code to it:

Code: [Select]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

If you already have a .htaccess file you'll want to add ONLY the 2nd and 3rd lines directly after the first instance of:

Code: [Select]
RewriteEngine On
This will force all pages of your site to use HTTPS instead of HTTP.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 06:32:52 AM
How do we determine if our host has the SSL certificate is installed?
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 07:18:40 AM
Look in cPanel. It should be somewhere near the SSL icon and will say "Let's Encrypt".
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 07:39:11 AM
Got it.  :thumbup:
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 07:43:11 AM
Getting ready to add the code to my .htaccess file now.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 07:59:19 AM
Quick and easy!
Thanks for this new and useful tip Steve.  :thumbup:
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 08:04:22 AM
Something isn't right...look at the lock symbol to the left of the arrow in the image above and in your browser. It's not green and does not say "Secure" like on my site. It may be due to images. If you go to the "Search" page you'll see the difference. It works there.

For instance, go to the "Home" page and you will see it is not secure. Change the image to have "HTTPS" and it should say "Secure".
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 08:13:31 AM
Yeah, I saw that.

How to do this?
Quote
Change the image to have "HTTPS" and it should say "Secure".
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 08:19:52 AM
Find the link for the image and change it. It may be due to a link in a mod. For instance, check the settings in your mods and change the URL in the settings, etc. Any images you upload that have a direct link you should make sure they use "HTTPS", etc.

And you have a broken image on the home page now...
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 08:27:27 AM
The home page image was just changed a few minutes ago, so you may need to do a hard refresh.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 08:29:23 AM
The image URL is showing the green lock.

https://www.ourfamilyforum.org/FamilyForum/tp-images/64uidspring2.jpg
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 08:37:38 AM
The image is but the page itself is not showing it for some reason...
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 08:44:21 AM
It may be the 'Our FamilyForum' banner, I'm working on that now.
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 08:45:49 AM
I've already changed the logo in the theme's settings after you installed AutoSSL. ;)

EDIT: I just went through all of the admin and changed all of the mods and admin settings that needed changing. I think there may be some theme issues...
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 08:55:55 AM
We must have been working on the logo at the same time.  laughing7

Here's the current URL (https://www.ourfamilyforum.org/FamilyForum/gallery/0/64-060517084701.png) for the logo. I uploaded it to the gallery and that's being used now instead of the TinyPic link.
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 09:00:14 AM
Yeah, I'm thinking there's something up with this theme. If you right-click on some of the images and then click Inspect the code doe snot say "HTTPS".

EDIT: Ok, I've changed to Curves and no change so something else is wrong...
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 09:09:29 AM
I just cycled through all of the themes that are available in the themes block and they are all missing the green lock
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 09:21:38 AM
I'm in cPanel. If you see a white screen just logout then back in. I changed a few links like in settings there was http instead of https, the redirect, etc. but get the same. It's got to be something...

Was just talking to Les on Skype. He said the images should be on the same server. External images may cause it to show as unsecured....
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 11:39:06 AM
I'm wondering if the portals have anything to do with it...
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 11:43:45 AM
Could be... if you want to do so you could try an uninstall to see what happens.  :azn:
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 11:45:08 AM
Yeah, I may try that a bit later as I do need to redo my forum...been a long time coming. LOL
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 04:36:13 PM
Ha! Use this modified version of repair_settings.php and change all links to https! I found the code fix on SMF:

https://www.simplemachines.org/community/index.php?topic=550197.msg3901127#msg3901127

EDIT: Almost forgot... They are working on a newer version of repair_settings.php and v2.0.14 which should address these things...hopefully. Not sure when it'll be released.
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 05:38:28 PM
I ran the modified repair_settings.php here but still the same. It worked for my site...
Title: Re: How To Force HTTP to HTTPS
Post by: Lesmond on May 06, 2017, 05:49:46 PM
Links to insecure pages, links to images below each one :o
Total pages crawled: 47

Pages with unsecure content:
https://www.ourfamilyforum.org/ ?
https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81& ?
http://i61.tinypic.com/8wxx5e.jpg
http://www.ourfamilyforum.org/FamilyForum/tp-images/64uidHappy-New-Year-1.png

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=tpmod;sa=help ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade ?
http://i61.tinypic.com/8wxx5e.jpg
http://www.ourfamilyforum.org/FamilyForum/avatars/avatar_64_1452085227.png

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=forum ?
http://i61.tinypic.com/8wxx5e.jpg
http://www.ourfamilyforum.org/FamilyForum/avatars/avatar_142_1452088519.gif
http://www.ourfamilyforum.org/FamilyForum/avatars/avatar_64_1452085227.png

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=help ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=login ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=calendar ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=register ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&cat=169 ?
http://i61.tinypic.com/8wxx5e.jpg
http://www.ourfamilyforum.org/FamilyForum/tp-images/64uidHappy-New-Year-1.png

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=gallery ?
http://i61.tinypic.com/8wxx5e.jpg
http://www.ourfamilyforum.org/FamilyForum/gallery/0/thumb_64-060117172857.jpeg
http://www.ourfamilyforum.org/FamilyForum/gallery/0/thumb_64-290716120736-603310.jpeg
http://www.ourfamilyforum.org/FamilyForum/gallery/0/thumb_64-070116103139-16.jpeg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=gallery;sa=search ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=gallery;sa=stats ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?topic=31 ?
http://i61.tinypic.com/8wxx5e.jpg
http://www.ourfamilyforum.org/FamilyForum/avatars/avatar_142_1452088519.gif
http://www.ourfamilyforum.org/FamilyForum/avatars/avatar_64_1452085227.png
http://www.tinyportal.net/docs/Themes/tp_docs_theme/images/theme/logo.png
http://www.ourfamilyforum.org/FamilyForum/avatars/avatar_2_1452115258.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=credits ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&wap2 ?
http://www.ourfamilyforum.org/FamilyForum/tp-images/64uidHappy-New-Year-1.png

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=tpmod;sa=credits ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=tpmod;sa=help;p=introduction ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=tpmod;sa=help;p=articles ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=tpmod;sa=help;p=frontpage ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=tpmod;sa=help;p=panels ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=tpmod;sa=help;p=modules ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=tpmod;sa=help;p=plugins ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=312 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=tpmod;sa=help;p=blocks ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=311 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=310 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=309 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=308 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=303 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=63 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=299 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=305 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=302 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=298 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=1 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=125 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=30 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=106 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=295 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=play;game=26 ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=arena ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;sa=stats ?
http://i61.tinypic.com/8wxx5e.jpg

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;category=0 ?
http://i61.tinypic.com/8wxx5e.jpg
http://www.ourfamilyforum.org/FamilyForum/avatars/avatar_64_1452085227.png

https://www.ourfamilyforum.org/FamilyForum/index.php?PHPSESSID=857962cdbb25dd4dba3430a91c403e81&action=arcade;category=13 ?
http://i61.tinypic.com/8wxx5e.jpg
http://www.ourfamilyforum.org/FamilyForum/avatars/avatar_64_1452085227.png
http://www.ourfamilyforum.org/FamilyForum/avatars/avatar_189_1452115284.png
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 06:16:34 PM
Yup! Lots of images...mostly TinyPic ones...

Edit: OK, Kenny... There's bad news and there's bad news.  :D There's lots of Tinypic images that are not secured because their servers are not secured. Your sig from TP is also not secured because it is hosting on TP which is not secured. There's a ton of pics hosted at TinyPic and would require a lot of work to change them all or move them to here or a secured server elsewhere.

You'll have to host the images yourself for your site to show secured. The good news is that the login shows as secured which is the most important thing. I'm not sure if some browsers will tell people that the site is unsecured or not. That is another big issue. As long as people do not see that or the login as unsecured then you'll be OK.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 07:20:48 PM
Fixed my TP Docs sig... that was easy.
But, the TinyPic thing will not be so easy. I'll uninstall it, but the existing image links will be a problem.

EDIT: BTW... thanks ever so much for all the good, err, bad news.  laughing7
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 07:26:58 PM
Np, Kenny. LOL
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 07:30:04 PM
Np, Kenny. LOL

hahahahaha...  :P

OK, TinyPic uninstalled.
Title: Re: How To Force HTTP to HTTPS
Post by: Lesmond on May 06, 2017, 07:40:11 PM
I have started my own image hosting site Ken, and its ssl secure too, more coming later about that.
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 06, 2017, 07:51:45 PM
I tried changing your sig to https but it breaks...
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 08:04:53 PM
I have started my own image hosting site Ken, and its ssl secure too, more coming later about that.

Sounds good Less, be sure to keep us posted.

Steve, maybe I just need to remove my sig.

EDIT: Steve, is my sig image showing as posted here for you?
https://www.ourfamilyforum.org/FamilyForum/gallery/0/64-060517191358.png
Title: Re: How To Force HTTP to HTTPS
Post by: Lesmond on May 06, 2017, 08:08:54 PM
Tinypotal doesn't have a secure site Ken, so you will have to host the image here, but you can still link it to TP
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 06, 2017, 08:10:36 PM
Tinypotal doesn't have a secure site Ken, so you will have to host the image here, but you can still link it to TP

Thanks Les... just made that change.  :thumbup:
https://www.ourfamilyforum.org/FamilyForum/gallery/0/64-060517191358.png
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 07, 2017, 06:47:08 PM
Les and I found out the links to the gallery will not be secured if used elsewhere on the forum for some reason. I believe it is cause there are links in the gallery admin that use http. Mainly, the smfhacks link and the twitter link. Smfhacks.org is not secured and the link to twitter in the settings uses http instead of https.

I uploaded both of our avatars to the avy folder on the server and now some pages show as secured like Help.

EDIT: I just uploaded your avy too and it works. The forum main page shows as secured.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 07, 2017, 09:09:12 PM
Nice work on the avatars.  :thumbup:

Looks like our main culprit now is just the gallery.
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 07, 2017, 09:16:45 PM
I just finished regenerating the thumbnails and now everything looks secured to me except the gallery page itself!
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 07, 2017, 09:42:51 PM
This process seems to be a bit of a can of worms because of the external links that we have on our sites, especially externally linked images.
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 07, 2017, 09:46:46 PM
Yup! I try not to use external images and try as much as I can to host them myself if only not to hotlink (use other site's bandwidth).
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 07, 2017, 09:47:18 PM
Just did a little surfing through the site using the SMF Default theme and in that theme all of the pages show as unsecured.  :o
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 07, 2017, 09:48:26 PM
gotta get off now, my show 'Elementary' is coming on!  laughing7
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 07, 2017, 09:50:53 PM
I did that yesterday and noticed the same thing. I checked it thinking the theme was the culprit. There are images in it that are unsecured I think but didn't get a change to check them yet...
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 10, 2017, 08:20:30 AM
I've found a little known setting that may also help. In the admin, under Cookies and Sessions enable:

Quote
Force cookies to be secure
(This only applies if you are using HTTPS - don't use otherwise!)

I've enabled it here and on my forum.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 10, 2017, 10:39:50 AM
Good find.  :thumbup:

Now we just have to monitor to see how it works.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 10, 2017, 10:42:28 AM
The Gallery shows as unsecured.

EDIT: but individual pictures show as secured.  :o
NOTE: this was while in the WorkDesk theme.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 10, 2017, 10:47:31 AM
And the SMF Default theme still shows unsecured in all pages.
Title: Re: How To Force HTTP to HTTPS
Post by: Lesmond on May 11, 2017, 08:40:14 AM
For secure images, I have made this site to upload images, you will have to register to upload pictures, you can also upload images from a url  :wink:
link https://tinypix.top

Here is one from the site in bbcode ...
(https://tinypix.top/images/2017/05/11/cda8b68d3ef639cdd73b2be7e430f05c.md.jpg) (https://tinypix.top/image/Baw)
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on May 11, 2017, 09:07:48 AM
Thanks for that Les.  :thumbup:
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on May 13, 2017, 09:43:55 AM
So far, things seem to be working good in Chrome here. Maybe it takes a bit of time to fully kick in.

Btw, I've deleted FF and reinstalled it and still get the same issues. LOL
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on June 10, 2017, 09:36:43 AM
Ken, for some reason your avatar is not read as https so the forum is no longer seen as https. Not sure why yet...
Title: Re: How To Force HTTP to HTTPS
Post by: Mick on June 10, 2017, 12:07:49 PM
Ken, for some reason your avatar is not read as https so the forum is no longer seen as https. Not sure why yet...

Steve, I mean to ask you this the other day actually. 

A couple of weeks ago I moved all my sites to a new host.  Is there a idiots guide anywhere with a start to finish, step by step to making a SMF site https enabled.  My host provides the SSL certs and they are all enabled as far as I can tell.  Though I only have two sites running SMF 2.0.14 atm  :whistle1:, the other two are on SMF 2.0.13
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on June 10, 2017, 04:32:25 PM
I haven't seen a guide for SMF yet but I've had to read up on it using various websites and hosting tutorials.  As far as SMF goes, 2.0.14 is specifically setup for SSL. I'm not sure if it will work with 2.0.13 or older so you may have to upgrade the other two sites. Actually, I've been meaning to do a short tutorial on what I've learned...which isn't a heck of a lot. LOL

But you can read about it here:

https://www.docskillz.com/docs/index.php?topic=1214.0

There's also a link to a site that has a SSL Checker that will help you find any problems. It may not help you fix the problems but will alert you to them. The other half of the equation is the quality of hosting and if they have configured it properly. If you have problems let me know and I'll try to help. :)
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on June 10, 2017, 05:38:58 PM
I forgot to mention that sometimes it may take a day for it fully work. I guess it goes through some sort of "propagation", I guess. And I take my answer back about it working on SMF 2.0.13 cause it was working on there...I forgot about that. LOL

Actually, it does work here but on some pages. The pages where Ken's avy is not showing I see it as secured.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on June 10, 2017, 09:14:47 PM
I forgot to mention that sometimes it may take a day for it fully work. I guess it goes through some sort of "propagation", I guess. And I take my answer back about it working on SMF 2.0.13 cause it was working on there...I forgot about that. LOL

Actually, it does work here but on some pages. The pages where Ken's avy is not showing I see it as secured.
How can I fix that?
EDIT: removed the avatar, but it still shows the yellow triangle.
Title: Re: How To Force HTTP to HTTPS
Post by: Mick on June 11, 2017, 03:56:44 AM

How can I fix that?
EDIT: removed the avatar, but it still shows the yellow triangle.

I'm seeing a green padlock (Firefox and Chrome) since you've removed it.  Unless you've fixed something else after you posted, it looks good.

Steve, thanks for the info, that's good info.  Have bookmarked for when I give it a go.  The redirect for the htaccess, is this something that can be done via cpanel, redirects, or does it have to be a manual edit to that file? 

Sorry for topic  hijack Ken.
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on June 11, 2017, 06:04:52 AM
It works for me now too, Ken. How did you upload it? Was it from another site?

Mick, if you do not already have an .htaccess a redirect will create one but will only add redirection code to it. You can easily create one using cPanel's File Manager or any file editing program and uploading it via FTP. If you already have one just add that code to it:

Quote
Even if you have a SSL installed, you and your visitors can still view the HTTP part of your site. To prevent this you can create a .htaccess file and put it in your root directory where your domain resides. You should add the following code to it:

Code: [Select]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

If you already have a .htaccess file you'll want to add ONLY the 2nd and 3rd lines directly after the first instance of:

Code: [Select]
RewriteEngine On
This will force all pages of your site to use HTTPS instead of HTTP.

That being said, you'll want to make sure that any external images come from sites that are secured and any links are also secured.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on June 11, 2017, 10:50:33 AM
np Mick... this is the kind of topic that may need to wander a bit to get a better understanding of out OP.  :)

It's showing a green lock for me now as well, maybe my browser just had a small load issue and needed more than one restart.

On the Avatars, this one from the Gallery gives me a green lock:
 (https://www.ourfamilyforum.org/FamilyForum/avatars/ken.png)

And this one that is uploaded gives the yellow triangle:
(https://www.ourfamilyforum.org/FamilyForum/gallery/0/64-110617105309.jpeg)
Title: Re: How To Force HTTP to HTTPS
Post by: Mick on June 11, 2017, 12:04:22 PM
np Mick... this is the kind of topic that may need to wander a bit to get a better understanding of out OP.  :)

It's showing a green lock for me now as well, maybe my browser just had a small load issue and needed more than one restart.

On the Avatars, this one from the Gallery gives me a green lock:
 (https://www.ourfamilyforum.org/FamilyForum/avatars/ken.png)

And this one that is uploaded gives the yellow triangle:
(https://www.ourfamilyforum.org/FamilyForum/gallery/0/64-110617105309.jpeg)

Didn't they add the image proxy setting to SMF 2.0.14 to cure this problem with avatars?  Sure I read this somewhere.  That said, I'm not suggesting you upgrade to 2.0.14, at least not until 2.0.15 comes out.  Hopefully that one won't be so buggy. ;)
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on June 11, 2017, 01:26:00 PM
np Mick... this is the kind of topic that may need to wander a bit to get a better understanding of out OP.  :)

It's showing a green lock for me now as well, maybe my browser just had a small load issue and needed more than one restart.

On the Avatars, this one from the Gallery gives me a green lock:
 (https://www.ourfamilyforum.org/FamilyForum/avatars/ken.png)

And this one that is uploaded gives the yellow triangle:
(https://www.ourfamilyforum.org/FamilyForum/gallery/0/64-110617105309.jpeg)

Didn't they add the image proxy setting to SMF 2.0.14 to cure this problem with avatars?  Sure I read this somewhere.  That said, I'm not suggesting you upgrade to 2.0.14, at least not until 2.0.15 comes out.  Hopefully that one won't be so buggy. ;)

I think that Steve was going to update this site when 2.0.14 first came out, but held off because of some reported issues. Maybe he'll do it in the next week or two?  :whistle1:
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on June 11, 2017, 01:38:58 PM
np Mick... this is the kind of topic that may need to wander a bit to get a better understanding of out OP.  :)

It's showing a green lock for me now as well, maybe my browser just had a small load issue and needed more than one restart.

On the Avatars, this one from the Gallery gives me a green lock:
 (https://www.ourfamilyforum.org/FamilyForum/avatars/ken.png)

And this one that is uploaded gives the yellow triangle:
(https://www.ourfamilyforum.org/FamilyForum/gallery/0/64-110617105309.jpeg)

Didn't they add the image proxy setting to SMF 2.0.14 to cure this problem with avatars?  Sure I read this somewhere.  That said, I'm not suggesting you upgrade to 2.0.14, at least not until 2.0.15 comes out.  Hopefully that one won't be so buggy. ;)
Hmmm, has to be a reason why one image from the gallery works and the other does not...

LOL, don't hold your breath on SMF not being buggy.

I think that Steve was going to update this site when 2.0.14 first came out, but held off because of some reported issues. Maybe he'll do it in the next week or two?  :whistle1:

Yes, I was but kind of expected it to be buggy. I can still upgrade it but would have no idea what to do about your mods. Many of them are outdated and may not work at all.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on June 11, 2017, 01:52:51 PM
That's a very good reason to hold off... it might take a day or three to sort through all the broken mods and there's no compelling reason to make the update. (... that I know of)
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on June 11, 2017, 01:57:55 PM
It is a security update as well although it doesn't seem to be touted as such.

Quote
! Check session while logging in
 ! Sanitize some fields to help guard against XSS
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on July 05, 2017, 09:39:54 AM
Ken, how EXACTLY are you adding your avatar? I think this is why the site is not showing https.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on July 05, 2017, 02:02:08 PM
I used the 'Upload an avatar' function... want me to remove it as a test?
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on July 06, 2017, 07:50:31 AM
If you uploaded it then that is probably not the reason.

Ah! Figured it out! TP's site is not fully secured...well the docs aren't. It's your sig. ;)
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on July 06, 2017, 08:08:17 AM
OK... the sig is gone!  laughing7
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on July 06, 2017, 08:36:48 AM
Damn! didn't work... Are you uploading the avatar from your hard drive? It's not from the gallery, right?
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on July 06, 2017, 09:04:17 AM
You can add your sig now. I went into your profile and chose a pic from the gallery option and chose the same image.

You've also had file integrity issues with the avy's and attachments that are now fixed. You should be able to upload your avy's the normal way now. :)

I'm starting to think this is another SMF bug since I've had to do this on several sites that have been updated since 2.0.13 and was not noticed or fixed in 2.0.14.

EDIT: Btw, you can add your sig now. Let's see if it works.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on July 06, 2017, 10:57:30 AM
Just uploaded an avatar from my desktop.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on July 06, 2017, 11:04:26 AM
Working on a new sig, using the image that's in the gallery.
(https://www.ourfamilyforum.org/FamilyForum/gallery/0/64-060517191358.png) (http://www.tinyportal.net/docs/index.php)



https://www.ourfamilyforum.org/FamilyForum/gallery/0/64-060517191358.png
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on July 06, 2017, 11:12:57 AM
sig added back.  :thumbup:
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on July 06, 2017, 11:15:35 AM
But the new avy is probably not right now...one or the other is...

Time to take a nap...will work on this later...
Title: Re: How To Force HTTP to HTTPS
Post by: Mick on July 06, 2017, 01:33:21 PM
Did you perhaps miss something when you ran repair_settings?
Title: Re: How To Force HTTP to HTTPS
Post by: Mick on July 06, 2017, 05:09:24 PM
Was probably this,  Upload URL

http://www.ourfamilyforum.org/FamilyForum/avatars

Now changed to this,

https://www.ourfamilyforum.org/FamilyForum/avatars
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on July 06, 2017, 07:48:03 PM
Excellent catch Mick!  :thumbup:
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on July 08, 2017, 01:23:18 AM
Of course... Think of the easy way out while I think of the hard way. LOL
Title: Re: How To Force HTTP to HTTPS
Post by: Mick on July 08, 2017, 03:18:00 AM
I looked at that setting at the bottom of that page couple of times, and though, no that can't be the upload url, because the avatar is working and the avatars url at the top of the page was https.  Just thought I'd try it and the padlock turned green.   We learn something every day. ;)

By the way, I've managed to change two of my sites to https so far,

https://thegardenmachineryforum.co.uk
https://guitaristguild.com

Had images linked from all over the place in various blocks, so took a while to run around adding s to all the urls lol.. 
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on July 08, 2017, 09:24:50 AM
shawnb61 posted this as a step by step how to on SMF.  laughing7

https://www.simplemachines.org/community/index.php?topic=555034.0
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on July 09, 2017, 08:26:33 PM
Nice! I planned on making a tutorial myself but have been busy with the vps.
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on February 21, 2019, 02:56:38 AM
I've just found another way to do this via a mySQL query courtesy of SMFHelper.com. This will change all instances of any posts from HTTP to HTTPS:

https://www.smfhelper.com/index.php?topic=74.0 (https://www.smfhelper.com/index.php?topic=74.0)

Code: [Select]
UPDATE smf_messages SET body = REPLACE(body, 'http://yourstite.tld/index.php', 'https://yourstite.tld/index.php');
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on February 21, 2019, 02:34:41 PM
I've just found another way to do this via a mySQL query courtesy of SMFHelper.com. This will change all instances of any posts from HTTP to HTTPS:

https://www.smfhelper.com/index.php?topic=74.0 (https://www.smfhelper.com/index.php?topic=74.0)

Code: [Select]
UPDATE smf_messages SET body = REPLACE(body, 'http://yourstite.tld/index.php', 'https://yourstite.tld/index.php');

Good find Steve.  :thumbup:
Do we need this? We already have that taken care of, yes?  8)
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on February 22, 2019, 07:27:14 AM
No, remember we manually (did the long way...each one) went through it when we changed the site to https.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on February 22, 2019, 07:32:46 AM
Good deal, I thought so but wanted to be sure.  :thumbup:
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on February 22, 2019, 07:57:06 AM
I was looking for a way like this back then but didn't know how.
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on February 22, 2019, 07:59:59 AM
Research leads to knowledge, good on you for staying with the task.  :thumbup:
Title: Re: How To Force HTTP to HTTPS
Post by: Skhilled on February 22, 2019, 08:05:42 AM
Was luck that someone else posted it and I saw it. LOL
Title: Re: How To Force HTTP to HTTPS
Post by: Ken on February 22, 2019, 08:11:11 AM
It all counts, you knew a good solution when you saw it.  :thumbup: