gpt4 book ai didi

Apache mod_rewrite %{HTTP_USER_AGENT} 不等于 + 或条件(列表)

转载 作者:行者123 更新时间:2023-12-02 22:18:08 25 4
gpt4 key购买 nike

我现在的状态是这样的:

RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]

我想知道如何将此条件交换为 if not 上述值之一。

我想过这样的事情:

RewriteCond %{HTTP_USER_AGENT} !="android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]

但它不起作用。

最佳答案

问题是您在 operamobile 之间有一个空格,这导致 mod_rewrite 将其解析为多个参数。尝试将括号而不是引号与 ! 结合使用并转义空格:

RewriteCond %{HTTP_USER_AGENT} !(android|blackberry|ipad|iphone|ipod|iemobile|opera\ mobile|palmos|webos|googlebot-mobile) [NC]

关于Apache mod_rewrite %{HTTP_USER_AGENT} 不等于 + 或条件(列表),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14138856/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com