nginx指定域名跳转到指定目录

直接上代码

 if ( $host = 'e.xhcss.com' ){ 
set $subdomain "/e";
}
if ( $host = 'eg.xhcss.com' ){ 
set $subdomain "/eg";
}
if ( $host = 'test3.wehudong.cn' ){ 
set $subdomain "/sb";
}
if ( $host = 'm.xhcss.com' ){ 
set $subdomain "/m";
}
location ~ /(data|templets|uploads|html|images|xh|special|st|static)/.*\.(php|php5)?$ { 
deny all; 
}


相关内容

发表评论

验证码:
点击我更换图片

最新评论