Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 重写条件以检查智能手机中的移动用户代理_Apache_Http_Mod Rewrite - Fatal编程技术网

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,但它相当“重”。试着从以下方面获得一些灵感: