Need to automatically jump to the corresponding phone station page when the phone accesses the PC station page

Source: Internet
Author: User
Tags lenovo

if ( $http_user_agent ~ "((MIDP)|(WAP)|(UP.Browser)|(Smar

Tphone) | (Obigo) | (Mobile) | (AU. Browser) | (WxD. MMS) | (Wxdb.browser) | (CLDC) | (U
P.link) | (KM. Browser) | (UCWEB) | (Semc-browser) | (Mini) | (Symbian) | (Palm) | (Nokia) | (Panasonic) | (MOT)
| (SonyEricsson) | (NEC) | (Alcatel) | (Ericsson) | (BENQ) | (BenQ) | (amoisonic) | (Amoi) | (Capitel) | (PHILIPS
)| (SAMSUNG) | (Lenovo) | (Mitsu) | (Motorola) | (Sharp) | (Wapper) | (LG) | (EG900) | (C
ECT) | (Compal) | (Kejian) | (Bird) | (BIRD) | (g900/v1.0) | (Arima) | (CTL) | (TDG) | (Da
Xian) | (Daxian) | (Dbtel) | (eastcom) | (eastcom) | (Pantech) | (Dopod) | (Haier) | (HAIER) | (Konka) | (Kejian) |
(LENOVO) | (Soutec) | (Soutec) | (SAGEM) | (SEC) | (SED) | (Emol) | (INNO55) | (ZTE) | (IP
Hone) | (Android) | (Windows CE) | (Wget) | (Java) | (Curl) | (Opera)) {

Rewrite ^/(. *) $ http://wap.xxx.cn/$1;
       rewrite ^/$ http://wap.xxx.cn;    }            这段是用于配置手机访问web站点自动跳转到手机页面。            这个代码需要配置再web站点的service{} 区域里,位置再集群跳转区块前做判断。                    location ~ \.(do)$ {        proxy_pass http://upstream;        proxy_set_header  Host $host;        proxy_set_header  Cookie $http_cookie;        proxy_set_header  X-Real-IP  $remote_addr;        proxy_redirect off;        client_max_body_size 10m;        client_body_buffer_size 128k;        proxy_connect_timeout 90;        proxy_send_timeout 90;        proxy_read_timeout 90;        proxy_buffer_size 4k;        proxy_buffers 4 32k;        proxy_busy_buffers_size 64k;        proxy_temp_file_write_size 64k;            }     location ~* ^/(upload)/ {        root /mnt/www;                     expires 1d;            }

Need to automatically jump to the corresponding phone station page when the phone accesses the PC station page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.