I want to redirect requests on two conditions using nginx.
This doesn\'t work:
if ($host = \'domain.com\' || $host = \'domain2.com\'){ rewrite ^/(
another possibility would be
server_name domain.com domain2.com; set $wanted_domain_name domain.com; if ($http_host != $wanted_domain_name) { rewrite ^(.*)$ https://$wanted_domain_name$1; }
so it will redirect all to one specific but it's based on the usecase i guess