Simple nginx domain redirect
2020.03.11
linuxnginx
Add to the server block:
if ($host = example1.com) {
return 301 https://example2.com$request_uri;
}
Add to the server block:
if ($host = example1.com) {
return 301 https://example2.com$request_uri;
}