I have a page hosted at DH where I want to place an IFrame that renders content from another site. More specifically, I have a Drupal site with a page where I’ve placed an IFrame to get live dynamic content from an IIS box where I’m hosting an ASP.NET app. I don’t like the idea that my dh_site.com website has an IFrame that links directly to my iis_site.com site - it’s just a little too much exposure.
So I’d like to refer to dh_site.com/othersite/page.aspx and have that and all other references to /othersite retrieve content transparently from the other domain.
Is this redirection? Mirroring? How can I set this up?
For anyone else doing something like this, another technique would be to do this:
$url = “http://iis_site.com/page.aspx”;
The problem there is that you need to remove all wrapper tags and just render content. There will also be problems with scripts, CSS, etc. because the content is all a part of the local page. With an IFrame, all content is in a little page of its own, wrapped in HTML tags. If you use the file_get_contents method the URL isn’t exposed because the page is processed on the server and output as returned as pure text. Whereas an IFrame itself is rendered to the browser, which then follows the link back from the IFrame as another HTTP call.
I need the client to make the call for state management, callbacks, etc. I just don’t want to expose my iis_site.com in the process.