Sorry, correct remap.config as below map https://www.example.com/ http://real-www.example.com/ regex_redirect http://([\w\.\-]+)\.example.com/ https://$1.example.com/
Thanks, -Ethan 2014-03-17 22:39 GMT+08:00 Ethan Lai <yz...@yahoo.com>: > Hi, > > As I know, map rules have type > precedence<http://trafficserver.readthedocs.org/en/latest/reference/configuration/remap.config.en.html#precedence> > . > And current traffic server doesn't map target to replacement recursively. > > However, after a successful map rule, another (regex_)redirect rule still > take effect. Just wondering is this expected behavior or not? > > > I'd want traffic server to be my SSL termination, and I'd also redirect > non-SSL requests to SSL URLs. > > With following remap.config, the final response will be HTTP 301 with > https://real-www.test.example.com Location header. > > > map https://www.example.com/ http://real-www.example.com/ > regex_redirect http://([\w\.\-]+)\.abc.com/ https://$1.abc.com/ > > > Since remap rules are first matched, would it be better to stop redirect > match after a success map? > > > Patch file, which only tests redirect rules after url_remap failed, is > attached, please comment. > > Thanks, > -Ethan >