########### 二级域名自动转到子目录下 #######################
set $sub_domain "";
if ($http_host ~ "(.+).soul.com$") {
set $sub_domain $1;
}
if ($http_host = "www.soul.com") {
set $sub_domain "";
}
if ($sub_domain != "") {
rewrite /(.+) /$sub_domain/$1 break;
}
##########################二级域名自动转到子目录下(修改版)#####################
set $sub_domain "";
if ($http_host ~ "(.+).zjlhll.cn$") {
set $sub_domain $1;
}
if ($sub_domain != "") {
rewrite /(.+).zjlhll.cn/(.+) /$1.zjlhll.cn/$2 last;
rewrite /(.+) /$sub_domain.zjlhll.cn/$1 last;
}
###########################################################
二级域名自动转到子目录下
最新推荐文章于 2025-03-30 23:23:55 发布