Forum Discussion

Ryan_34424's avatar
Ryan_34424
Icon for Altostratus rankAltostratus
Mar 27, 2019

APM :: Detecting IE 11

Ok I suck, I know. But why is this wrong?

expr { [string tolower [mcget {session.user.agent}]] matches_regex {trident\/7.+rv\:11} }

It never matches... even though my UA is:

Mozilla/5.0 (Windows NT 10.0; Win64; x64; Trident/7.0; rv:11.0) like Gecko

I'm using an empty branch rule with this as the 'advanced' script above. Always hits fallback (i.e. doesn't match).

3 Replies

  • Tried this too

    expr { [string tolower [mcget {session.user.agent}]] matches_regex {.*trident/7.*rv:11.*} }
    
  • I'm wondering if this is an issue with variable scope. Even something simple isn't working.

    expr { [mcget {session.user.agent}] contains "rv:11" }
    

    I'm using this in a macro, and that macro is used in a macro that is called from the main access policy post authentication.

    If I go to the access policy reports and search for the session ID, I see the session variable assigned above, but it's like I can't call it or something...

    ... still digging.

  • I never figured out why, but I used a different Windows box, and it worked fine.