Forum Discussion
User-Agent redirect to use any browser except IE
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]" } } }
10 Replies
- ekaleido
Cirrus
Clarify your question a bit, please. You want to redirect based on browser, or you want IE to be forcibly changed to Firefox or Chrome?
One is easy but unreliable, the other isn't possible.
- J__Warner_48356
Nimbostratus
We would like IE to be forcibly changed to Firefox or Chrome.
- ekaleido
Cirrus
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.
- J__Warner_48356
Nimbostratus
We currently have a webserver that is performing this. They want to utilize the F5 to perform it. Here is the server script.
- J__Warner_48356
Nimbostratus
- ekaleido
Cirrus
That is horrifying. I can't imagine F5 is going to let you emulate that in an iRule.
- Vijay_E
Cirrus
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.
- ekaleido
Cirrus
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.
- Stanislas_Piro2
Cumulonimbus
you can try this irule:
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 } } }
- cjunior
Nacreous
Stanislas :)
Recent Discussions
Related Content
* 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