Looking through many different posts and have not found an irule that works my requirements. I am looking to have the irule detect if URL is opened in IE and auto redirect in Chrome or Firefox browser. The closet i have been able to find is:
when HTTP_REQUEST { switch -glob [string tolower [HTTP::header User-Agent]] { “firefox” { do nothing and allow request to go to the VS pool } default { HTTP::redirect “http://abcdefg.com[HTTP::uri]” } } }
Not going to be possible for so many security reasons.
Perhaps an alternative is to redirect IE to a website declaring the requirement for Firefox or Chrome and providing links for download.
Basically you want an end user to trust your/any website to run arbitrary code on their PC. I think you can see the security problem that would present.
To echo ekaleido’s words, I never knew you can force a client machine to pick another browser. You could end up breaking any security/compliance posture. Sorry, not being helpful with the actual question but found this conversation interesting.
The scary part is that is a functional piece of IE (note it’s called by a hook into ActiveX) and it could potentially be used to run ANY piece of arbitrary code.
when HTTP_REQUEST {
Check if the URI is /maintenance
if {[string tolower [HTTP::header "User-Agent"]] contains msie} {
Send an HTTP 200 response with a Javascript
HTTP::respond 200 content \
"Browser redirectinsert your code herebody>\
Wrong browser, we will try to start a real internet browser :)" "Content-Type" "text/html"
return
}
}
}