nginx 手机端访问跳转到m站点
location / { if ($http_user_agent ~* (mobile|nokia|iphone|ipad|android|samsung|htc|blackberry)) { rewrite ^/(.*)$ http://m.1weidu.com/$1 permanent; #进行正常访问的时候判断user_agent为手机,则重写至此页面 } try_files $uri /index.php?$args; }
nginx 手机端访问跳转到m站点
location / { if ($http_user_agent ~* (mobile|nokia|iphone|ipad|android|samsung|htc|blackberry)) { rewrite ^/(.*)$ http://m.1weidu.com/$1 permanent; #进行正常访问的时候判断user_agent为手机,则重写至此页面 } try_files $uri /index.php?$args; }
上一篇:nginx远程PHP开发环境设置
下一篇:创建自己的vagrant box