Htaccess redirect problem!

two redirecting problems have been solved
but there are still two unsolved problems

first question
suppose a domain name is
http://xxx.ooo.com/
, but I have a https, but he will not add the
hypothesis himself when someone enters the http://xxx.ooo.com/. Can I add https://xxx.ooo.com/ and redirect it?

second question
enter https://ppp.com, but there is no https, so he will warn and stop. How to transfer to https://www.ppp.com when entering https://ppp.com?

Mar.18,2021

I answered the first
if it is apache, and supports rewite, you can use hatcess

.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]

if nginx, needs to change the configuration of the server

the second one needs to be configured through the server. I don't know if you are using apache,nginx?.

Menu