Hi,

using the header rewrite plugin works perfectly. Thank you very much for the 
help!

Have a nice weekend

Christian

-------------------------------------------------------------
Christian Hutter ([email protected]<mailto:[email protected]>)
Service Informatique Université
University of Luxembourg



On 17 Apr 2015, at 11:19, Sudheer Vinukonda 
<[email protected]<mailto:[email protected]>> wrote:

The reason match all mapping is matched ahead of the redirect rule is due to 
the precedence order for map rules vs redirect rules.

https://docs.trafficserver.apache.org/en/latest/reference/configuration/remap.config.en.html#precedence

But the precedence rules does bring up a problem in that, like you noticed the 
match-all rule effectively results in ignoring any redirect/reverse_map rules 
ahead of it. This is perhaps something that could (should?) be enhanced/fixed.

In the mean time, for your specific issue, you may use the header_rewrite 
plugin to do the redirect for http (see an example below):

$cat remap.config

map http://service.domain.com/ 
https://this<https://this/>-is-a-non-existent-domain.com/<http://is-a-non-existent-domain.com/>
 @plugin=header_rewrite.so @pparam=header_rewrite.config
map https://service.domain.com https://servera.domain.com
map / http://default.domain.com/


$cat header_rewrite.config

%cond {READ_REQUEST_PRE_REMAP_HOOK}
set-redirect 301 https://service.domain.com<https://service.domain.com/> [L]


Thanks,

Sudheer

________________________________
From: Christian HUTTER <[email protected]<mailto:[email protected]>>
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Sent: Friday, April 17, 2015 12:01 AM
Subject: Mixing redirect and match-all in remap.config

Hi,

I’m facing a problem with  ats 5.2.1 as reverse proxy and redirects in 
combination with a match all mapping.  My configuration in remap.config is as 
follows:

redirect http://service.domain.com/ https://service.domain.com/
map https://service.domain.com https://servera.domain.com
map / http://default.domain.com/

If I try to access https://service.domain.com<https://service.domain.com/> it 
works as supposed showing me the page on servera. But accessing 
http://service.domain.com<http://service.domain.com/> does not redirect to 
https but shows me the page on default.domain.com<http://default.domain.com>. 
As soon as I comment out the catch-all map rule the redirection rule works.

Could someone please explain to me how to have redirect and catch-all?

Thank you for your help.


Greetings

Christian

-------------------------------------------------------------
Christian Hutter ([email protected]<mailto:[email protected]>)
Service Informatique Université
University of Luxembourg




Reply via email to