1

What is the most reliable way to route traffic from abc.com to xyz.com/abc? How does the server at xyz.com know for sure how to route the traffic to the /abc path?

I understand that it might be a lot easier to route traffic from abc.com to abc.xyz.com, but looking to do something potentially more dynamic here.

2
  • What technology are you asking about? nginx? apache2? Jan 5, 2022 at 8:49
  • I guess I meant what information does it use to do it? what is the most reliable piece of information or technique regardless of aoache vs nginx? Jan 5, 2022 at 17:48

2 Answers 2

2

You are looking for a reverse proxy. Lots of loadbalancer type software has this functionality. Nginx and apache are very popular ones.

1

I'm not sure if it's the best option, but I would do as you described, first routing abc.com to abc.xyz.com via DNS records, and then letting the webserver, through a virtual host (at least that's how Apache calls it), take care of the redirection from abc.xyz.com to xyz.com/abc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.