9 lines
184 B
Text
9 lines
184 B
Text
set $root_domain "";
|
|
|
|
if ($server_name ~* ^www\.(?<apex_domain>.+)$) {
|
|
set $root_domain $apex_domain;
|
|
}
|
|
|
|
if ($host = $root_domain) {
|
|
return 307 $scheme://$server_name$request_uri;
|
|
}
|