trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Hedstrom <>
Subject Re: remap based on useragent
Date Tue, 13 Aug 2013 01:55:11 GMT
On Aug 12, 2013, at 7:34 PM, Scott Harris <> wrote:

> With our migration to ats we have a requirement to do remaps to different origin servers
based on useragent.
> Is there a way to do this with ats or existing plugin or will i need to write my own
plugin to do this?
> Scott

I think the header_rewrite plugin can do this. Been a while since I used it, but something
like (try this carefully though)

# This is a configuration example when used as a remap plugin  rule

  cond %{HEADER:User-Agent} /safari/
  set-destination HOST [L]

  cond %{HEADER:User-Agent} /msie/
  set-destination HOST  [L]

  cond %{HEADER:User-Agent} /mozilla/
  set-destination HOST [L]

If you want to use it as a global plugin (that applies to all requests regardless of which
remap rule triggers), you have to add a condition like


Again, this is right out of my bu^h^h head, check out the README. I could not see any docs
for the plugin in Sphinx, not sure if we have one or not ? I should probably write one if
there isn't one ...


-- Leif
View raw message