You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Rafiee <ra...@gmail.com> on 2016/06/05 12:00:41 UTC

http redirection

Hi
I am use this ATS for http redirectiton to any host
I do not know how to do redirection
this config for redirect to one host
""/etc/trafficserver/remap.conf
       redirect http://c1.com http://c2.com ""

please help me.
thanks

Re: http redirection

Posted by Leif Hedstrom <zw...@apache.org>.
What defines request1, request2 etc? I think you will need to show some real examples for us to have a chance to understand what you want to do.

-- Leif 

> On Jun 5, 2016, at 2:06 PM, Rafiee <ra...@gmail.com> wrote:
> 
> i am want all request to two and more host redirection
> for example: 
> request 1 redirect to host 1
> request 2 redirect to host 2
> request 3 redirect to host 1
> thanks
> best regards
> 
>> On Sun, 5 Jun 2016 at 20:13 Leif Hedstrom <zw...@apache.org> wrote:
>> 
>> > On Jun 5, 2016, at 6:00 AM, Rafiee <ra...@gmail.com> wrote:
>> >
>> > Hi
>> > I am use this ATS for http redirectiton to any host
>> > I do not know how to do redirection
>> > this config for redirect to one host
>> > ""/etc/trafficserver/remap.conf
>> >       redirect http://c1.com http://c2.com ""
>> 
>> 
>> 
>> There’s not enough information in this question. Are you trying to redirect a domain ? See the documentation at
>> 
>>         https://docs.trafficserver.apache.org/en/latest/admin-guide/files/remap.config.en.html
>> 
>> — left

Re: http redirection

Posted by Leif Hedstrom <zw...@apache.org>.
> On Jun 5, 2016, at 10:41 PM, Rafiee <ra...@gmail.com> wrote:
> 
> <Redirect.jpg>




Ok, that makes sense I think (although, I’d probably question why you don’t let ATS proxy instead of doing redirects). That much said, depending on what identifies the requests (request1 vs request2), you either should use the redirect directive in remap.config (if it’s based on the Host header), or your can use the regex_remap plugin (if it’s based on the path of the requests). Both are documented in the docs (see below).

— Leif

https://docs.trafficserver.apache.org/en/latest/admin-guide/files/remap.config.en.html#redirect-mapping-rules
https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/regex_remap.en.html

Re: http redirection

Posted by Rafiee <ra...@gmail.com>.
[image: Redirect.jpg]

On Mon, 6 Jun 2016 at 04:37 Leif Hedstrom <zw...@apache.org> wrote:

> Also when you say redirect, I'm guessing you don't mean redirect? A
> redirect in HTTP is e.g a 302 response asking the client to go elsewhere.
>
> Are you asking to do round-robin between a number of origin servers?
>
> -- Leif
>
> On Jun 5, 2016, at 2:06 PM, Rafiee <ra...@gmail.com> wrote:
>
> i am want all request to two and more host redirection
> for example:
> request 1 redirect to host 1
> request 2 redirect to host 2
> request 3 redirect to host 1
> thanks
> best regards
>
> On Sun, 5 Jun 2016 at 20:13 Leif Hedstrom <zw...@apache.org> wrote:
>
>>
>> > On Jun 5, 2016, at 6:00 AM, Rafiee <ra...@gmail.com> wrote:
>> >
>> > Hi
>> > I am use this ATS for http redirectiton to any host
>> > I do not know how to do redirection
>> > this config for redirect to one host
>> > ""/etc/trafficserver/remap.conf
>> >       redirect http://c1.com http://c2.com ""
>>
>>
>>
>> There’s not enough information in this question. Are you trying to
>> redirect a domain ? See the documentation at
>>
>>
>> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/remap.config.en.html
>>
>> — left
>>
>>

Re: http redirection

Posted by Leif Hedstrom <zw...@apache.org>.
Also when you say redirect, I'm guessing you don't mean redirect? A redirect in HTTP is e.g a 302 response asking the client to go elsewhere.

Are you asking to do round-robin between a number of origin servers?

-- Leif 

> On Jun 5, 2016, at 2:06 PM, Rafiee <ra...@gmail.com> wrote:
> 
> i am want all request to two and more host redirection
> for example: 
> request 1 redirect to host 1
> request 2 redirect to host 2
> request 3 redirect to host 1
> thanks
> best regards
> 
>> On Sun, 5 Jun 2016 at 20:13 Leif Hedstrom <zw...@apache.org> wrote:
>> 
>> > On Jun 5, 2016, at 6:00 AM, Rafiee <ra...@gmail.com> wrote:
>> >
>> > Hi
>> > I am use this ATS for http redirectiton to any host
>> > I do not know how to do redirection
>> > this config for redirect to one host
>> > ""/etc/trafficserver/remap.conf
>> >       redirect http://c1.com http://c2.com ""
>> 
>> 
>> 
>> There’s not enough information in this question. Are you trying to redirect a domain ? See the documentation at
>> 
>>         https://docs.trafficserver.apache.org/en/latest/admin-guide/files/remap.config.en.html
>> 
>> — left

Re: http redirection

Posted by Rafiee <ra...@gmail.com>.
i am want all request to two and more host redirection
for example:
request 1 redirect to host 1
request 2 redirect to host 2
request 3 redirect to host 1
thanks
best regards

On Sun, 5 Jun 2016 at 20:13 Leif Hedstrom <zw...@apache.org> wrote:

>
> > On Jun 5, 2016, at 6:00 AM, Rafiee <ra...@gmail.com> wrote:
> >
> > Hi
> > I am use this ATS for http redirectiton to any host
> > I do not know how to do redirection
> > this config for redirect to one host
> > ""/etc/trafficserver/remap.conf
> >       redirect http://c1.com http://c2.com ""
>
>
>
> There’s not enough information in this question. Are you trying to
> redirect a domain ? See the documentation at
>
>
> https://docs.trafficserver.apache.org/en/latest/admin-guide/files/remap.config.en.html
>
> — left
>
>

Re: http redirection

Posted by Leif Hedstrom <zw...@apache.org>.
> On Jun 5, 2016, at 6:00 AM, Rafiee <ra...@gmail.com> wrote:
> 
> Hi
> I am use this ATS for http redirectiton to any host
> I do not know how to do redirection
> this config for redirect to one host
> ""/etc/trafficserver/remap.conf
>       redirect http://c1.com http://c2.com ""



There’s not enough information in this question. Are you trying to redirect a domain ? See the documentation at

	https://docs.trafficserver.apache.org/en/latest/admin-guide/files/remap.config.en.html

— left