Forum Discussion
K-Dubb
Nimbostratus
Jan 19, 2012Friendly URI Re-Write based off of User-Agent?
Hi everyone,
I was wondering if it is possible to do a URL Re-write based off the user-agent of the browser?
For instance, we have users that come in on url1.domain.com and are the...
Chris_Phillips
Nimbostratus
Jan 20, 2012I don't see why the redirect (i.e. an actual 302) is going to still happen. In theory the LTM could intercept a 302 and act upon it itself, but if you can anticipate that situation, you'd just do a rewrite in the first place.
so the iRule just says if the user agent contains "mozilla" or "testagent" then send the request to the pool aaa, and change the HTTP Host header to suit what the end server is expecting. otherwise send it to pool zzz. I put the Host header change in as an example, maybe you actually want to change the uri as well or something. If pool zzz is the default pool on the vip then there's no need for the else {} block at all.
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