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 14, 2014OK so assuming my syntax is correct I'd have something like the iRule below. How can I capture the address entered to the user so I can redirect him to that address once he click "Continue" on the warning page?
when HTTP_REQUEST {
if { not ( [HTTP::cookie exists WRONGBROWSER] ) AND [class match [string tolower[HTTP::header "User-Agent"]] contains "firefox"]} {
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