My first thought is that what you really want to do is use mod_proxy
in apache on your friend's server. I think the ProxyPass
directive (and ProxyPassReverse
) will let you do what you want.
From what you said it sounds as if you're doing essentially this already, but I'm not sure. I didn't carefully reread the apache documentation, but I think that the ProxyPassReverse
directive should let you rewrite the URL that's coming back from your server when it's returned from your friend's.
Gavin