Forum Discussion
Michael_Yates
Oct 12, 2011Nimbostratus
Hi tech_cbre,
The hardest part of what you are trying to do is determine which traffic to route. You could use the User Agent of the devices (the old devices as you put it) to make the determination which devices need to be redirected to the new URL.
Something like this will allow you to handle the User Agents that need to be redirected, or log the unknown User Agents.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::header User-Agent]] {
"*msie*" { do something }
"*firefox*" { do something }
"*chrome*" { do something }
default {
log local0. "Unhandled User Agent: [HTTP::header User-Agent]"
}
}
}
Hope this helps.