[Solved] Redirecting domain, keeping the path

Hey,

I have two domains, and I want to forward all traffic from one domain to the other. Usually I’d do this via DNS but the client is quite specific that if someone visits https://www.example.com/a-specific-path it gets redirected to https://www.exampletwo.com/a-specific-path

Is this possible?

Thanks!

Solved this.

If anyone lands here looking for the solution, this was it;

http://olddomain.com/* https://newdomain.com/:splat 301!
https://olddomain.com/* https://newdomain.com/:splat 301!
http://www.olddomain.com/* https://newdomain.com/:splat 301!
https://www.olddomain.com/* https://newdomain.com/:splat 301!
1 Like

Nice! Thanks for coming back and sharing your solution.