如果用户代理不是移动的,我需要创建一个重定向。不幸的是我做不到。
#RewriteCond %{HTTP_USER_AGENT} !"android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC,OR]
RewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^/?$ "https\:\/\/example\.com\/home" [R=302,L]任何帮助都是非常感谢的。谢谢。
发布于 2015-04-14 20:19:10
做好了
# REDIRECT DESKTOP
RewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteCond %{HTTP_USER_AGENT} !(android|blackberry|googlebot-mobile|iemobile|iphone|ipod|opera\smobile|palmos|webos) [NC]
RewriteRule ^/?$ "https\:\/\/example\.com\/home" [R=302,L]
# REDIRECT MOBILE
RewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^example\.com\/home$ [OR]
RewriteCond %{HTTP_HOST} ^example\.com$
RewriteCond %{HTTP:x-wap-profile} !^$ [OR]
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC,OR]
RewriteCond %{HTTP:Profile} !^$
RewriteRule ^/?$ "https\:\/\/example\.com\/mobile" [R=302,L]https://stackoverflow.com/questions/29551358
复制相似问题