0

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_contents(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!

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by knkk
0

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.

Not exactly! AFAIK, there is an option in .htaccess by which we can rewrite URLS without any change in the URL itself.

0

@shubhamjain1: Thank you. That I think is only if it is internal URL rewriting (within the same site)/ If you are rewriting to a different website, then as far as I know you cannot keep the URL in the address bar the same.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.