I've got a domain like domain.com
and a path in it like /path
so that domain.com/path
redirects to another server entirely (let's say 128.10.10.10
).
This works, but I'd like to set it up so when I'm at 128.10.10.10
after the redirect the URL bar at the top of the browser reads domain.com/path
and so that any subfolders therein would be accessible via domain.com/path/subfolders
.
Any idea how to do this? The server (128.10.10.10
) is running Apache and CentOS.
Thanks!
For that, you'll want a reverse proxy:
When you do this, you'll no longer redirect traffic to 128.10.10.10. Traffic will flow through domain.com to 128.10.10.10. The 128.10.10.10 web process will see the traffic coming from domain.com, not from the end-user.
You can read more details at Apache's mod_proxy documentation.