Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试测试用户代理以使用 apache SSI 设置变量。
例如:
<!--#if expr="$HTTP_USER_AGENT = /chrome/" --> <!--#set var="isChrome" value="true" --> <!--#else --> <!--#set var="isChrome" value="false" --> <!--#endif -->
但是,“Chrome”的匹配失败。有没有办法指定匹配不区分大小写?
谢谢。
试试这个代码:<!--#if expr="$HTTP_USER_AGENT = /(C|c)hrome/" -->
<!--#if expr="$HTTP_USER_AGENT = /(C|c)hrome/" -->