I am trying to test the user agent to set a variable with apache SSI.
For example:
<!--#if expr="$HTTP_USER_AGENT = /chrome/" -->
<!--#set var="isChrome" value="true" -->
<!--#else -->
<!--#set var="isChrome" value="false" -->
<!--#endif -->
However, the match fails for ‘Chrome’. Is there a way to specify the match should be case insensitive?
Thanks.
Try this code:
<!--#if expr="$HTTP_USER_AGENT = /(C|c)hrome/" -->