如何使用iFrame匹配不同域中的URL

I have two websites. Domain.com and DomainTwo.com

Domain.com hosts all of the content and DomainTwo.com mirrors that content using a simple iFrame.

What I'd like to do is make it so if I link to "DomainTwo.com/folder/samplefile.jpg", the iFrame matches the URL and creates an iFrame for Domain.com/folder/sampelfile.jpg.

In other words, you wouldn't be able to tell DomainTwo.com is actually iframing anything unless you viewed the source code of the page.

Thank you!

Have you tried plopping the URI in your iframe src?

<iframe src ="http://Domain.com<?=$_SERVER['REQUEST_URI']?>">

in javascript it would be something like:

document.getElementsByTagName("iframe")[0].src = "http://domain.com" + location.pathname;

Of course clinking inside the iframe will not update the url. You'd probably be better of using wildcard domain, domain mapping, or whatever that's called.