0
点赞
收藏
分享

微信扫一扫

ngixn配置

E_topia 2022-01-20 阅读 42
nginx
  location  ^~/H5app {                                                                                                                                                                                                                     
             set $uid "$http_x_tif_uid";                                                                                                                                                                                                         
             set $h5_flag "0";                                                                                                                                                                                                                   
                 if ( $args ~ key= ) {                                                                                                                                                                                                           
                   set $h5_flag "1";                                                                                                                                                                                                             
                 }                                                                                                                                                                                                                               
                   set $union_char  "&";                                                                                                                                                                                                         
                 if ($is_args = "") {                                                                                                                                                                                                            
                   set $union_char  "?";                                                                                                                                                                                                         
                 }                                                                                                                                                                                                                               
                 if ( $h5_flag = "0" ){                                                                                                                                                                                                          
                   return 301 "https://smartgate.baoan.gov.cn/kshfwpt$request_uri${union_char}key=${uid}";                                                                                                                                       
                 }                                                                                                                                                                                                                               
            alias /opt/ces/H5app/;                                                                                                                                                                                                               
            index  index.html index.htm;                                                                                                                                                                                                         
        }             
举报

相关推荐

Ngixn(三)

配置vlan & 配置trunk

0 条评论