server模块下添加
----------
if ($http_user_agent ~* '(Android|webOS|iPhone|iPod|BlackBerry)') {
rewrite ^.+ http://mobile.test.com/mobile/$uri;
}
----------
其中mobile为手机端的路径标识, 可以自定义修改.
Nginx如何处理手机端和PC端跳转不同页面
猜你喜欢
转载自www.cnblogs.com/lazy-sang/p/12394879.html
今日推荐
周排行