简体   繁体   中英

redirect remote domain through my domain

I have a site, lets say it's called www.supersite.com. Now, I have a site called www.subsite.com. I would like to make calls to subsite return what is on supersite but keeping the url to subsite.

Now, to make it more interesting, the only change needed on subsite is this: Change www.subsite.com A record to {the IP of supersite}

I have full control of supersite, so if it needs any configuration for something like this, it can be done.

take care, lee

This should work:

Let the A record of www.subsite.web point to the same machine which runs www.supersite.web .

Then in the Apache configuration file of the machine which runs www.supersite.web , alias subsite and supersite using Apache's ServerAlias directive:

<VirtualHost *:80>
  ServerName www.supersite.web
  ServerAlias www.subsite.web
</VirtualHost>

Read more about ServerAlias and VirtualHost .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM