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

CC BY-SA 4.0
2022-08-07T21:15:58.880Z
2022-08-07T21:15:58.880Z
Levi
<p>I'm not sure if it's the best option, but I would do as you described, first routing <code>abc.com</code> to <code>abc.xyz.com</code> 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 <code>abc.xyz.com</code> to <code>xyz.com/abc</code>.</p>

CC BY-SA 4.0
2022-08-07T19:42:30.830Z
2022-08-07T19:42:30.830Z
Glorfindel
<p>What is the most reliable way to route traffic from <code>abc.com</code> to <code>xyz.com/abc</code>? How does the server at <code>xyz.com</code> know for sure how to route the traffic to the <code>/abc</code> path?</p>
<p>I understand that it might be a lot easier to route traffic from <code>abc.com</code> to <code>abc.xyz.com</code>, but looking to do something potentially more dynamic here.</p>

CC BY-SA 4.0
2022-01-05T08:49:20.340Z
What technology are you asking about? nginx? apache2?
Marcin Kunert
CC BY-SA 4.0
2022-01-05T17:48:08.887Z
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?
Alexander Mills
<networking>
Routing traffic from abc.com to xyz.com/abc
Alexander Mills
# Routing traffic from abc.com to xyz.com/abc

(Asked by: username_0 on 2022-01-04)

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.

**Tags:** networking

> **Comments:**
> **username_1**: What technology are you asking about? nginx? apache2?  
> **username_0**: 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?  

---

## 2 answers

### Answer by username_2 on 2022-08-07. Score: 2

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


---

### Answer by username_3 on 2022-08-07. Score: 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`.


---

