Originally Posted by Philip M
No. that would be dishonest, wouldn't it? That's what phishing sites try to do. Modern browsers block that kind of malarkey.
to note, and i'm not suggesting this as an ideal solution, but this sort of thing is possible, more so in modern browsers, given co-operation by both sites.
the old-school way to do it is with an iframe. you can place it edge-to-edge in css. the frame points to the long url, while the short url serves a shell page with little more than the iframe tag. the main downside to this technique is that the address bar does not change when the framed page navigates.
newer browser features provide better ways of doing this.
in newer browsers, you can actually update the full path in the url bar, not just the hash (#top).
even in ie8, you can use a hashChage and update "fragment" urls, not ideal but better than the nothing provided by the old-school technique.
one simple method, used in conjunction with the regular iframe, is to have clicks sent up to the top using top.postMessage() to set the user's url bar to the url of the frame.
a better but more complex method, is to use ajax to fetch a relative url from the long-url site instead of framing the long-url site. This means computerconnection.sandbox.computers.com must emit Access-Control-Allow-Origin headers set to "computerconnection.com" or "*".
in this fashion, you can bind nav-canceling click handlers to the A tags, call pushState(this.href) instead, and in your onpopstate()
event, use ajax to fetch the relative url :
from the remote site. Grab the html, parse it, update the body's innerHTML, re-bind all A tags, update the document.title, and set any classes on the html/body tag (if needed) with the new page's values.
if 40% of your visitors hit 5 pages, perhaps you might consider downloading those page's urls in the background once the landing page is loaded. it's quick because you only download the html, you don't have to render css, parse scripts, etc. if your ajax routine caches urls into ram, a click to those pages renders dang-near instantly.
anyways, again, i know this is a bit much for the OP, but it's something to keep in mind as a production-ready possibility. for a full site, i would rather switch the dns, but for cloning a smaller event sub-site or something like that, it's workable in the here and now.