...
|
...
|
@@ -16,11 +16,41 @@ server |
|
|
allow 172.16.0.0/16;
|
|
|
deny all;
|
|
|
|
|
|
# 子域名
|
|
|
if ($host = "sale.test.yoho.cn" ) {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
}
|
|
|
if ($host = "cuxiao.test.yoho.cn" ) {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
}
|
|
|
|
|
|
# 账号相关
|
|
|
location =/signin.html {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
}
|
|
|
location /passport/auth {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
}
|
|
|
location /passport/signin {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
}
|
|
|
|
|
|
# 个人中心
|
|
|
location /home {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
}
|
|
|
|
|
|
# 购物车
|
|
|
location /cart {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
}
|
|
|
|
|
|
location ~* \.html$ {
|
|
|
root /Data/code/git/yohobuy/assets;
|
|
|
if (-f $request_filename){
|
|
|
expires 3m;
|
|
|
if (!-f $request_filename){
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
}
|
|
|
expires 3m;
|
|
|
}
|
|
|
|
|
|
location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
|
...
|
...
|
|