Request domain redirection

Hi, I’m looking for a way to easily redirect all the requests to http://x.y/anything to https://z.w/anything.
I tried defining a new route matching x.y domain and adding request-termination plugin to return a 301 plus response-trasnformation with the location header set to z.w.
Anyway this seems to redirect any request matching x.y domain to z.w base url without “forwarding” the querystring.
Am I missing something? Is there another solution?

Please have a look at the following post:

You can simply change the forwarded_host part of the redirect URL being constructed.