Fluidetom_12222
Jan 13, 2014Cirrus
iRule to detect browser and display warning message
Hey Guys,
I'm trying to write an iRule to display a warning message when a user is trying to access our internal SharePoint intranet with a non-supported browser (such as Firefox - which is popular amongst our devs). I want this message to be displayed once per day and if the user clicks on "Continue" I'd like the F5 to redirect him to whatever address he was trying to access.
My problem is that I do not know the syntax for the irule.
I suppose it will be something +/- like this
when HTTP_REQUEST {
if { not ( [HTTP::cookie exists BANNERMESSAGE] ) AND [HTTP::header "User-Agent"] contains "mozilla"]} {
set expires [clock format [clock seconds] -format "%A, %d-%b-%Y 20:00:00"]
HTTP::respond 200 content "
Unsuppored browser
Dear Users,
You are using a non supported browser to access SharePoint.
If you use this browser not all SharePoint funtionalities will be available to you.
Please also note that the Helpdesk will only accept cases if using Internet Explorer.
Click to continue anyway
" "Set-Cookie" "WRONGBROWSER=1; path=/; expires=$expires"
What I do not know is :
- How to do a IF statement on two conditions (IF the WRONGBROWSER cookie does not exist AND if User-agent contains Mozilla THEN ...)
- How to capture the address the user was trying to reach and provide in my HTML page a link "Click here to continue" which would redirect the user to that specific address.
Would you know how I coul achieve this ?
Thanks in advance