Redirect certain urls to another server without changing domain


Well-Known Member
Sep 30, 2009
I have a couple urls (subdomain.domain.tld and domain2.tld/dir) that I currently have set to redirect to another server (server2.domain.tld(/dir)). The second server is running lighttpd and I would like the domain name not to change after the redirect. I think it involves mod_rewrite or mod_proxy, but wasn't sure how to go about doing this. Any ideas? e.g.:
http://subdomain.domain.tld => http://server2.domain.tld/dir (url is still http://subdomain.domain.tld)
http://domain2.tld/dir2 => http://server2.domain.tld/dir2 (url is still http://domain2.tld/dir2)