Hi, I am a non-www advocator, but am not a professional tech/coder. I was wondering if anyone can tell me how to make the above two rewrites, the most direct and official way.
But the bottom block seems not fully working. My condition is that besides mydomain.tld, I set another domain, forums.mydomain.tld, just like forums.cyberpanel.net.
I applied successfully a wildcard cert from Letsencrypt via acme.sh scripts, *.mydomain.tld, so I don’t have to set a forums.mydomain.tld separately for the forum domain.
Now the problem is, mydomain.tld can switch from 80 to 443 via rewriterules in that .htaccess file, forums.mydomain.tld will not. It can be accessed both by http and https.
The forums.mydomain.tld is put in a folder called forums under mydomain’s root, like this /home/mydomain.tld/public_html/forums. I didn’t set it in PowerDNS, but set it via Cloudflare’s A record, point it to my server’s IP addr.
So judging from your expertise, where should I go to make the forums part, forums.mydomain.tld forced to https/443? Or should I directly touch the httpd.conf?