trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miles Libbey <mlib...@apache.org>
Subject Re: Regex Remap plugin - follow redirect
Date Fri, 04 Dec 2015 22:55:33 GMT
I think this is indeed doable with the regex_remap plugin.  Something like
map   http://origin/ \    http://thispartdoesntmatter \    @plugin=regex_remap.so @pparam=regex.config 
where regex.config is your regex^/this.that.com/t.*/(.*)$ http://origin/$1

 


    On Thursday, December 3, 2015 8:12 AM, Steve Malenfant <smalenfant@gmail.com> wrote:
 

 Leif, 
I believe that's one I use that sends back a redirect to the user. I wanted to make the transfer
and forward through the parent/origin.
Steve
On Thu, Dec 3, 2015 at 10:13 AM, Leif Hedstrom <zwoop@apache.org> wrote:



On Dec 3, 2015, at 6:51 AM, Steve Malenfant <smalenfant@gmail.com> wrote:
Is there way we can modify the path of a filename requested to an origin? In this example,
I want to remove the "path" portion and only send the "filename" to the origin.
Looks like regex_map won't work from documentation (there is no regex_remap?) :"Only the host
field can contain a regex; the scheme, port, and other fields cannot. For path manipulation
via regexes, use the regex_remap plugin"
Here's what I tried :regex remap plugin line : ^/this.that.com/t.*/(.*)$ http://origin/$1
Original remapped request : http://origin/this.that.com/t1/test.ts



That is correct. There is a plugin to address this:
 https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/regex_remap.en.html

— leif





  
Mime
View raw message