You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Satheeshkumar Rajagopal <sa...@evolutiondigital.com> on 2019/12/20 04:10:26 UTC
ATS URL redirect
Hi,
We have created the rewrite rule to redirect the client request to a dynamic URL when the requested content is not available in the origin server.
Here the challenge is we have to form the redirection URL based on the source URL. We would like to get the $1 value from the client requested URL.
FYR,
cond %{SEND_RESPONSE_HDR_HOOK} [AND]
cond %{INCOMING-PORT} =8006
cond %{STATUS} =404 [AND]
cond %{PATH} /PLTV/
set-redirect 302 http://XXXX:8006/EvoLive/$1/STB.m3u8 [QSA]
set-destination URL http://XXXX:8006/EvoLive/$1/STB.m3u8
Thanks,
Satheeshkuamr.R
Re: ATS URL redirect
Posted by Leif Hedstrom <zw...@apache.org>.
This doesn’t work unfortunately. If all you are changing is the host, just do that. If not, possibly you can do this with the regex_remap plug-in (not sure though).
— Leif
> On Dec 21, 2019, at 16:44, Satheeshkumar Rajagopal <sa...@evolutiondigital.com> wrote:
>
> STB.m3u8
Re: ATS URL redirect
Posted by Miles Libbey <ml...@apache.org>.
While not exactly your question. the escalate plugin will have ATS go
try to fetch the object from a second origin on failure:
https://docs.trafficserver.apache.org/en/8.0.x/admin-guide/plugins/escalate.en.html
On Sat, Dec 21, 2019 at 3:44 PM Satheeshkumar Rajagopal
<sa...@evolutiondigital.com> wrote:
>
> Hi,
>
> We have created the rewrite rule to redirect the client request to a dynamic URL when the requested content is not available in the origin server.
>
> Here the challenge is we have to form the redirection URL based on the source URL. We would like to get the $1 value from the client requested URL.
>
> FYR,
> cond %{SEND_RESPONSE_HDR_HOOK} [AND]
> cond %{INCOMING-PORT} =8006
> cond %{STATUS} =404 [AND]
> cond %{PATH} /PLTV/
> set-redirect 302 http://XXXX:8006/EvoLive/$1/STB.m3u8 [QSA]
> set-destination URL http://XXXX:8006/EvoLive/$1/STB.m3u8
>
> Thanks,
> Satheeshkuamr.R
Re: ATS URL redirect
Posted by Leif Hedstrom <zw...@apache.org>.
This doesn’t work unfortunately. If all you are changing is the host, just do that. If not, possibly you can do this with the regex_remap plug-in (not sure though).
— Leif
> On Dec 21, 2019, at 16:44, Satheeshkumar Rajagopal <sa...@evolutiondigital.com> wrote:
>
> STB.m3u8