All of our rules are map except for a few regex_remap's at the end. But thanks 
for pointing that out, I was under the impression that it handled things in a 
top-down fashion since that's the way it is behaving now. Seems like that 
"Internal Priority" needs a bit more explanation where you might have more than 
one of the same type of rules. 

Either we have been incredibly lucky, or rules of the same type (i.e. 
regex_remap) are handled in a top down fashion, since that catch-all would 
definitely break many other things that we have in place that work just fine 
stripping things off. And without a way of specifying which rule to process 
before another, that makes life difficult. The whole point of what we are doing 
in the remap.config is to send things that need to be 
resized/scaled/manipulated to a separate service to be handled there, specified 
by specific patterns in the URL.

Argh. Now I need to review the rules and make sure we aren't on thin ice. It's 
working beautifully so far.

Brad


http://trafficserver.apache.org/docs/trunk/admin/configuration-files/remap.config.en.html#Precedence

"Remap rules are not processed top-down, but based on an internal priority

    map and reverse_map
    redirect and redirect_temporary
    regex_remap
    regex_redirect and regex_redirect_temporary
"

-----Original Message-----
From: Jan-Frode Myklebust [mailto:[email protected]] 
Sent: Tuesday, January 22, 2013 9:20 AM
To: [email protected]
Subject: Re: default maps in remap.conf

On Tue, Jan 22, 2013 at 3:10 PM, Williamson, Brad <[email protected]> 
wrote:
> We use this as a catch-all at the end of the remap list (i.e. the LAST line 
> in remap.config). It does not conflict with earlier rules in our experience, 
> we pick stuff off at various rules all over the place.
>
> regex_map http://([a-z\-0-9\.]+) 
> http://our.internal.catchall-server.com/
>

I (painfully) discovered that that trailing regex_map had precedence over all 
my "redirects" earlier in the file. Ref:
http://trafficserver.apache.org/docs/trunk/admin/configuration-files/remap.config.en.html
which says:


""" Remap rules are not processed top-down, but based on an internal priority
* map and reverse_map
* redirect and redirect_temporary
* regex_remap
* regex_redirect and regex_redirect_temporary """

.. not quite sure where regex_map fits in to that priority, but it seemed to 
have the same priority as "map".



  -jf

Reply via email to