Hi Dimitry,
you can define URL rewrite like this:
“rewrite_to”: “$tyk_context.headers_Host/$1"
If match pattern is “match_pattern”: “/.*"
A more in depth solution would be what bitsofinfo suggest here: Overriding Host Header not working - #9 by bitsofinfo