Forum Discussion

joshygeorge_206's avatar
joshygeorge_206
Icon for Nimbostratus rankNimbostratus
Jun 12, 2015

iRule - will this work?

Sorry if this is a stupid question. I'm a novice trying to validate a iRule and looking for expertise kindness / help. Just trying to logout & re-direct if the its a second time visit to a uri pattern. Will the following work?

 

when HTTP_REQUEST { if { [HTTP::uri] contains "xyz.com"}{ expr { [mcget {session.custom.logpatterncount}]+1}

 

if {expr { [mcget {session.custom. logpatterncount}] eq [2] }

 

{ ACCESS::session remove log local0. "hit for logout button" HTTP::redirect "http://www.test.com" } } }

 

2 Replies