Forum Discussion
Aviv
Cirrus
Feb 18, 2016IE user agent
Hi!
i have an app that support only IE.
i want to display a some message to all browsers except IE.
i have found that only IE have a user agent string that contains "Trident".
how to write an ir...
Aviv
Cirrus
Feb 20, 2016Ok! Now is works. This Irule will search for trident is the http request and if there is no such a string it will show an html page with a message that not ie browser is not supported. enjoy!
when RULE_INIT { set static::refresh_time 30 set static::notification_page {
BODY {text-align: center}
<h3>Open This Site Only in IE</h3>
`
<font color="DarkSlateBlue"
Thanks
<font color="Teal"
**IT Team**
}
}
when HTTP_REQUEST {
if { !([string tolower [HTTP::header User-Agent]] contains "trident") } {
HTTP::respond 200 content [subst $static::notification_page] Mime-Type "text/html"
log local0. "Client IP:[IP::client_addr] has been redirected with user agent :[HTTP::header User-Agent]"
}
else {
`}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
