How can I get web pages from sub.a.com using url sub.b.com?

Posted by Steven on Server Fault See other posts from Server Fault or by Steven
Published on 2011-11-30T09:10:10Z Indexed on 2011/11/30 10:02 UTC
Read the original article Hit count: 269

Filed under:

I have developed www.mysite.com. This site can be "integrated" into my partners website.

What I do is to create partner1.mysite.com and repalce my header and footer with my partners header and footer and replace some CSS styling.

This should make it as transaprent as possible for the user, so that they think they are still browsing my partners website.

There are two ways I see how I can accomplish this:
1. My partner uses an IFrame to show the content from partner1.mysite.com
2. My partner creates sub domain and points it to my sub domain.

Solution 1 is easy, but I'm not sure how search engines likes this, so I will try solution 2.

QUESTION
Can I use mysite.partner1.com but read content from partner1.mysite.com? I don't want to forward / redirect users to partner1.mysite.com. It's important that the URL is mysite.partner1.com / mysite.partner1.com/some/page.

Is this possible?

For testing, I have Apache configuration more or less like this:

NameVirtualHost 10.0.0.17

<VirtualHost 10.0.0.17>
    DocumentRoot D:/wamp/www/mysite/
    ServerName mysite.com
</VirtualHost>

<VirtualHost 10.0.0.17>
    DocumentRoot D:/wamp/www/mysite/
    ServerName site1.mysite.com
</VirtualHost>

// Since this is on my localhost, I also configure site1 here

<VirtualHost 10.0.0.17>
    DocumentRoot D:/wamp/www/site1/
    ServerName site1.com
</VirtualHost>

<VirtualHost 10.0.0.17>
    ServerName mysite.site1.com
    --> DO SOME SORT OF FORWARDING HERE <--
</VirtualHost>

© Server Fault or respective owner

Related posts about apache2