You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Randeep <ra...@gmail.com> on 2015/10/07 08:43:18 UTC

regex remap

Hi,

I'm trying to remove the qstring from the urls. Please help.

I have added the following line in the remap.config

map http://live.domain.com/ http://172.16.100.7/
@plugin=/opt/ats/libexec/trafficserver/regex_remap.so
@pparam=/tmp/regex.config @pparam=no-query-string

But in /tmp/regex.config I am not sure how to write the regrex rule.

is it like
^/(.*)$

queries are like the below.
http://live.domain.com/dash/Mtunes/video1/556810.m4s?_=1444199206362

I'm getting the following error there.

[Oct  7 12:10:10.836] Server {0x2aef3916f140} WARNING: Failed to create new
instance for plugin /opt/ats/libexec/trafficserver/regex_remap.so (not a
TS_SUCCESS return)
[Oct  7 12:10:10.836] Server {0x2aef3916f140} WARNING: Could not add rule
at line #209; Aborting!
[Oct  7 12:10:10.836] Server {0x2aef3916f140} WARNING: [ReverseProxy] Can't
create new remap instance for plugin
"/opt/ats/libexec/trafficserver/regex_remap.so" - Unknown plugin error at
line 209
[Oct  7 12:10:10.836] Server {0x2aef3916f140} WARNING: something failed
during BuildTable() -- check your remap plugins!
[Oct  7 12:10:10.836] Server {0x2aef3916f140} WARNING: Can not load the
remap table, exiting out!
[Oct  7 12:10:14.911] {0x2b7345ce7140} STATUS: opened
/opt/ats/var/log/trafficserver/diags.log
[Oct  7 12:10:14.911] {0x2b7345ce7140} NOTE: updated diags config
[Oct  7 12:10:14.915] Server {0x2b7345ce7140} NOTE: cache clustering
disabled
[Oct  7 12:10:14.925] Server {0x2b7345ce7140} NOTE: ip_allow.config
updated, reloading
[Oct  7 12:10:14.934] Server {0x2b7345ce7140} NOTE: cache clustering
disabled
[Oct  7 12:10:14.936] Server {0x2b7345ce7140} NOTE: logging initialized[3],
logging_mode = 3
[Oct  7 12:10:14.946] Server {0x2b7345ce7140} NOTE: loading SSL certificate
configuration from /opt/ats/etc/trafficserver/ssl_multicert.config


-- 
Randeep
Mob: +919447831699[kerala]
Mob: +919880050349[B'lore]
http://twitter.com/Randeeppr
http://in.linkedin.com/in/randeeppr

[image: --]
Randeep Raman
[image: http://]about.me/Randeeppr
<http://about.me/Randeeppr>

Re: regex remap

Posted by Randeep <ra...@gmail.com>.
Hi,

It worked.

map http://live.lukup.com/ http://172.16.100.7/
 @plugin=/opt/ats/libexec/trafficserver/regex_remap.so
@pparam=/tmp/regex.config @pparam=no-query-string

My regex rule was wrong. It should be as

^/(.*)$ http://172.16.100.7/$1

Regards,
Randeep


On Wed, Oct 7, 2015 at 12:13 PM, Randeep <ra...@gmail.com> wrote:

> Hi,
>
> I'm trying to remove the qstring from the urls. Please help.
>
> I have added the following line in the remap.config
>
> map http://live.domain.com/ http://172.16.100.7/
> @plugin=/opt/ats/libexec/trafficserver/regex_remap.so
> @pparam=/tmp/regex.config @pparam=no-query-string
>
> But in /tmp/regex.config I am not sure how to write the regrex rule.
>
> is it like
> ^/(.*)$
>
> queries are like the below.
> http://live.domain.com/dash/Mtunes/video1/556810.m4s?_=1444199206362
>
> I'm getting the following error there.
>
> [Oct  7 12:10:10.836] Server {0x2aef3916f140} WARNING: Failed to create
> new instance for plugin /opt/ats/libexec/trafficserver/regex_remap.so (not
> a TS_SUCCESS return)
> [Oct  7 12:10:10.836] Server {0x2aef3916f140} WARNING: Could not add rule
> at line #209; Aborting!
> [Oct  7 12:10:10.836] Server {0x2aef3916f140} WARNING: [ReverseProxy]
> Can't create new remap instance for plugin
> "/opt/ats/libexec/trafficserver/regex_remap.so" - Unknown plugin error at
> line 209
> [Oct  7 12:10:10.836] Server {0x2aef3916f140} WARNING: something failed
> during BuildTable() -- check your remap plugins!
> [Oct  7 12:10:10.836] Server {0x2aef3916f140} WARNING: Can not load the
> remap table, exiting out!
> [Oct  7 12:10:14.911] {0x2b7345ce7140} STATUS: opened
> /opt/ats/var/log/trafficserver/diags.log
> [Oct  7 12:10:14.911] {0x2b7345ce7140} NOTE: updated diags config
> [Oct  7 12:10:14.915] Server {0x2b7345ce7140} NOTE: cache clustering
> disabled
> [Oct  7 12:10:14.925] Server {0x2b7345ce7140} NOTE: ip_allow.config
> updated, reloading
> [Oct  7 12:10:14.934] Server {0x2b7345ce7140} NOTE: cache clustering
> disabled
> [Oct  7 12:10:14.936] Server {0x2b7345ce7140} NOTE: logging
> initialized[3], logging_mode = 3
> [Oct  7 12:10:14.946] Server {0x2b7345ce7140} NOTE: loading SSL
> certificate configuration from
> /opt/ats/etc/trafficserver/ssl_multicert.config
>
>
> --
> Randeep
> Mob: +919447831699[kerala]
> Mob: +919880050349[B'lore]
> http://twitter.com/Randeeppr
> http://in.linkedin.com/in/randeeppr
>
> [image: --]
> Randeep Raman
> [image: http://]about.me/Randeeppr
> <http://about.me/Randeeppr>
>
>



-- 
Randeep
Mob: +919447831699[kerala]
Mob: +919880050349[B'lore]
http://twitter.com/Randeeppr
http://in.linkedin.com/in/randeeppr

[image: --]
Randeep Raman
[image: http://]about.me/Randeeppr
<http://about.me/Randeeppr>