Page 1 of 1

help with https on default website

Posted: Wed 22 Sep 2021 9:33 pm
by Whizzwoz
Hello I wonder if anyone can help me with the default website converting it to https://.
I got lets encrypt cert and installed it and everything works accept I cannot get Subject Alt Names to work.
My domain is:http://www.lancingweather.net and dericts to https://.
But cannot get http://lancingweather.net to redirect to https://
I have it running on a rpi3 with Apache. Domain with no ip.
Went to why no padlock to test them and for http://lancinweather.net it says I will have to setup a htaccess file? Is that right just need a little bit of help on this one!

Thanks for taking the time to read.
Cheers Warren.

Re: help with https on default website

Posted: Thu 23 Sep 2021 12:32 am
by Mapantz
You can do it via cpanel. However, you can also manually add it to the .htaccess file yourself, as follows:

Code: Select all

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Re: help with https on default website

Posted: Thu 23 Sep 2021 6:20 am
by beteljuice
The rewrite rule is missing the s !!!!!

Re: help with https on default website

Posted: Thu 23 Sep 2021 9:18 pm
by Whizzwoz
thanks for help guys I think I might get some webspace on ionos where my domains are and get a ca cert with them then I will have a proper cpanel etc.
Seems to be a lot of hard work on the rpi3 webserver will go back to windows pc again.
cheers Warren

Re: help with https on default website

Posted: Fri 24 Sep 2021 1:12 am
by Whizzwoz
hello guys yes got it working now on the rpi3 but have to disable TLSv1 according to why no padlock? testing site.
Any ideas?
Cheers for the help so far.
Thanks Warren.