我目前的状况布莱恩这样的:
My current condition goin like that:
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
我不知道我怎么可以换这种情况为如果不是上面的值之一。
I wonder how can i swap this condition into "if not" one of the values above.
我因子评分类似的东西:
I tought about something like that:
RewriteCond %{HTTP_USER_AGENT} !="android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
但它不工作。
but its doesnt work.
现在的问题是你有歌剧
和移动之间有一个空格
,这将导致mod_rewrite的分析它的多个参数。尝试使用结合引号括号,而不是用
和逃避的空间!
The problem is you've got a space between opera
and mobile
, which causes mod_rewrite to parse it as multiple parameters. Try using parentheses instead of quotes in conjunction with !
and escape the space:
RewriteCond %{HTTP_USER_AGENT} !(android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile) [NC]