当前位置: 动力学知识库 > 问答 > 编程问答 >

mod rewrite - update .htaccess file to include redirect for macbook air

问题描述:

I have redirect coding in .htaccess file - I just want to include macbook air in the list of devices to forward to a mobile specific site...

is this the right code to target it?

RewriteCond %{HTTP_USER_AGENT} "macbook air"[NC,OR]

thanks,

网友答案:

There's no way to determine the (Apple) laptop model type from a HTTP user agent string, or any other HTTP header, regardless of what browser they are using.

网友答案:

I'm pretty sure that browsers on a MacBook Air don't send a different user agent, so it's not possible to redirect its users to a mobile version.

That said, the MacBook Air functions more like a regular laptop (with keyboard and largish screen, not like the iPad), so most users would probably prefer the regular version anyway.

分享给朋友:
您可能感兴趣的文章:
随机阅读: