Apache 重写条件以检查智能手机中的移动用户代理
我正在编写重写条件以检查用户代理Apache 重写条件以检查智能手机中的移动用户代理,apache,http,mod-rewrite,Apache,Http,Mod Rewrite,我正在编写重写条件以检查用户代理 1. The request should be from Mobile and 2. The request should not be from iphone/Black Berry/Android Device/ Windows Phone 我有这样的东西 RewriteCond %{HTTP_USER_AGENT} Mobile [AND] RewriteCond %{HTTP_USER_AGENT} !"android|blackberry|IOS|
1. The request should be from Mobile and
2. The request should not be from iphone/Black Berry/Android Device/ Windows Phone
我有这样的东西
RewriteCond %{HTTP_USER_AGENT} Mobile [AND]
RewriteCond %{HTTP_USER_AGENT} !"android|blackberry|IOS|windows phone" [NC]
有人能纠正这一点吗
RewriteCond %{HTTP_USER_AGENT} ^.*(Android|BlackBerry|iPhone|Windows Phone).*$ [NC]
RewriteRule ^(.+)$ /go_to_mobile_or_403/$1 [L]
资料来源:
谢谢您的回复。但我不想添加条件和检查手机也。如果你想检测功能手机,没有简单准确的方法。有WURFL,但它相当“重”。试着从以下方面获得一些灵感: