I think it's missing quite a bit. Also, for readability, it's best for those kind of pieces of "code" to put it between three backticks (```) on its own line above and below the code.
This isn't going to put a redirect in place as far as I know? Is this complete?
I'm assuming your mail subdomain has its own <VirtualHost> section? If so, the redirect code should also be in that<VirtualHost> section. I assume those two RewriteCond statements were in your websites <VirtualHost> section?
Well, it looks sort of OK now.. The RewriteCond for example.com and www.example.com aren't really necessary in this VirtualHost, as it's just for mail.example.com. But it probably doesn't harm too.. I don't know how they ended up in your squirrelmail.conf in the first place though.. Perhaps you copied it from your websites conf when you set up squirrelmail? In that case, I think certbot didn't add the redirect, because it probably thought there already was a redirect in place.. Albeit being the incorrect one
One thing I noticed is when I go to "www.example.com" it redirects to "example.com" - it doesn't really matter and it might have been doing that before and I just didn't notice it.
", I think certbot didn't add the redirect, because it probably thought there already was a redirect in place.. Albeit being the incorrect one "
Oh I see, interesting. Well this whole exercise is a learning endeavor for me so this has been good education. thx!
Looks exactly like the redirect code certbot has or would have added.. And that's the first part of the two redirects. The second part is handled in the WordPress PHP code.