Hi @clendee, sorry I’m late to the party, it’s that time of year!
I’ve put a permanent redirect in my Apache 2.4.29 so all http traffic is converted to https. Nothing is ever transmitted clear:
Redirect permanent / https://cloud.darksteve.tk/
# DocumentRoot /usr/local/www/owncloud
Header always set Strict-Transport-Security "max-age=15768000"
This works perfectly for me. Of course, your issue might be caused by DNS. I used to have this issue when I was still learning and I first set up a home server in 2004. This will take a moment to write clearly.
When you access your site externally, DNS directs you to your real-world IP address (e.g. 18.104.22.168). Your router is configured to forward ports 80 and 443, so your request connects straight through to your server’s internal IP (e.g. 192.168.1.1).
When you access your site internally, DNS still directs you to your real-world IP address (your router), but you’re already internal so port forwarding won’t work, and you get an error.
It took me way longer than it should have to figure out back in 2004, but once I realised, it was kind of obvious. You can get around this by adding a line to your desktop/laptop’s hostfile, but then the device won’t connect externally and it’s hard to change a phone’s hosts file anyway.
I started running my own internal DNS and DHCP servers. My internal DCHP server provides only my internal DNS, which directs me to 192.168.1.1, but once I’m external, the external DHCP will assign you an external DNS that will direct you to your real-world IP of 22.214.171.124.
This has added benefits of allowing you to blocks ads/malware for the house, and also allows you to get around ISP blocks (e.g. here in Australia, TPB and other sites are blocked via DNS).
I hope this helps, sorry I was late!