trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elli <lema...@yahoo.com>
Subject Priority of remap.config rules
Date Wed, 25 Apr 2012 11:39:16 GMT
Hello,

I am trying to configure a map and redirect rule in remap.config and wanted to find out what
the precedence of rules are.

From some experiments it looks like map rules in general take precendence over redirect rules.



My use case is I have a regex_map rule which catches a set of urls.  For one of those urls
I want an exception that gets redirected.  The redirect rule is listed first so I expected
that rule to handle the request.  Instead the map rule is catching the request. Is there
some way to do this? I thought about potentially using the regex remap plugin to handle the
redirect but that seems like an ugly hack.

For example if we set up
 
redirect      http://beetroot.server.net:8080     http://www.yahoo.com
regex_map http://.*.server.net:8080              http://www.google.com
 
and we hit this with 
 
curl -v -o dontwant.txt beetroot.server.net:8080/images
 
we get a 302 from google to 
Location: http://beetroot.server.net:8080/imghp
 
 
If we remove the regex_map line we get a 301 from yahoo to
 
Location: http://www.yahoo.com/images

Thanks

Mime
View raw message