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, 2012So, currently you are sending back a 302 and want to make this not occur my pre-empting the destination that they will be redirected to and instead rewrite the incoming request? So when you say "The application to not see the redirect" you mean "The application to not need to provide the redirect", right? So what does this not satisfy?...
when HTTP_REQUEST {
if { (string tolower [HTTP::header "User-Agent"] contains "mozilla") || (string tolower [HTTP::header "User-Agent"] contains "testagent") } {
pool aaa
HTTP::header replace "Host" "url2.domain.com"
} else {
pool zzz
}
}
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