problem with redirect domain.tld => www.domain.tld with NGINX
Hi,
I have problem with this directive because I have 3 domains on my server and when I use the SEO redirection all the page was redirected to the first domain.
When I se de vhost I see this command:
if ($http_host = "domain.tld") {
rewrite ^ $scheme://www.domain.tld$request_uri? permanent;
}
I change it to:
if ($http_host ~* "^domain.tld$") {
rewrite ^ $scheme://www.domain.tld$request_uri? permanent;
}
I tested and the redirection works fine. Please fix it.
Kind Regards.