📅  最后修改于: 2022-03-11 14:59:39.488000             🧑  作者: Mango
if ($host ~* www\.(.*)) {
set $host_without_www $1;
rewrite ^(.*)$ http://$host_without_www$1 permanent; # $1 contains '/foo', not 'www.mydomain.com/foo'
}