Displaying content from another site

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • knkk
    New Member
    • Jun 2007
    • 49

    #1

    Displaying content from another site

    I have 2 sites, example.co.in and example.com, hosted on 2 different servers (I have all access details for both).

    When someone accesses example.co.in/a/b.php?c=d, I want it to show the HTML of example.com/a/b.php?c=d

    This site has to be search-engine-friendly, so I do not want to use an iframe, or even AJAX, since all the content has to be in the HTML - basically, example.co.in/a/b.php?c=d should output just the same HTML as example.com/a/b.php?c=d would.

    I could use echo file_get_conten ts(example.com/a/b.php?c=d) in example.co.in, but that would mean a request goes from the example.co.in server to the example.com server, and then the output would come to the example.co.in server, which would then send it to the user. That could mean time delay, and also that I am using twice the bandwidth - since there is data transfer from both my servers.

    Apache rewrite will change the URL, which I do not want to happen - I want people who browse example.co.in to stay on it.

    I was wondering if any of the numerous experienced people on this forum would be able to suggest a solution . Thank you very much for your time!
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    Why don't you just use Domain Forwarding from your host?

    Comment

    • knkk
      New Member
      • Jun 2007
      • 49

      #3
      well, these are 2 different machines physically, in different continents. Plus, I do not want the URL in teh address bar. Does domain forwarding work with both of these requirements?

      Comment

      • knkk
        New Member
        • Jun 2007
        • 49

        #4
        So finally I just redirected the first site to the second site, but through .htaccess. So the url stays the same, but the data comes out of the second site's database, which is the common database. (The second site has several subdomains like this, and that is handled in the .htaccess too.)

        Comment

        Working...