I have an SSL certificate on domain.com, but if a user goes to https://www.domain.com, it throws a ‘wrong domain’ security error.
I’m just wondering on best practice for redirecting all traffic from http://www.domain.com to domain.com. I tried throwing a rewriterule into passenger, but it still seems to suffer the same problem.
Any ideas appreciated.
Fairly easy to do that with nginx..
That will redirect all requests hitting
www.example.comtohttps://example.com