Forum Discussion
Fluidetom_12222
Cirrus
Jan 13, 2014iRule 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...
Fluidetom_12222
Cirrus
Jan 13, 2014OK for some reason the iRule is not properly displayed, so here's a stripped down version without the HTML code
when HTTP_REQUEST {
if { not ( [HTTP::cookie exists WRONGBROWSER] ) AND [class match [HTTP::header "User-Agent"] contains "Mozilla"]} { set expires [clock format [clock seconds] -format "%A, %d-%b-%Y 20:00:00"]
HTTP::respond 200 content "
HTML
click here to continue (with a link to https://whatever_he-was_trying_access
/HTML
" "Set-Cookie" "WRONGBROWSER=1; path=/; expires=$expires"
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects