server {
server_name subdomain.domain.com;
listen 80;
return 301 http://google.com;
}
server {
server_name domain.com www.domain.com;
listen 80;
return 301 https://$server_name$request_uri;
}
server {
listen [% $site.port %];
server_name www.[% $site.host %];
rewrite ^/?(.*) $scheme://[% $site.host %]/$1 permanent;
}
server {
listen [% $site.port %];
server_name www.[% $site.host %];
return 301 $scheme://[% $site.host %]$request_uri;
}