<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: How do I legitimately hijack website content?</title>
	<link>http://ask.metafilter.com/69412/How-do-I-legitimately-hijack-website-content/</link>
	<description>Comments on Ask MetaFilter post How do I legitimately hijack website content?</description>
	<pubDate>Wed, 15 Aug 2007 17:44:39 -0800</pubDate>
	<lastBuildDate>Wed, 15 Aug 2007 17:44:39 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: How do I legitimately hijack website content?</title>
		<link>http://ask.metafilter.com/69412/How-do-I-legitimately-hijack-website-content</link>	
		<description>HTML/Javascript:  I need to &quot;hijack&quot; website content so that it appears to be hosted by a different domain (with the full knowledge and cooperation of all parties). &lt;br /&gt;&lt;br /&gt; My boss maintains a website at, let&apos;s say, boss.example.com.  He has an affiliation with another organization with a nicer domain name, let&apos;s say, fancyexample.com&lt;br&gt;
&lt;br&gt;
He would like to allow users of fancyexample.com to go to fancyexample.com/boss and see all of his boss.example.com content as though it were hosted on fancyexample.com.  So if a user went to fancyexample.com/boss/homepage.html they would see that in the address bar but the content would be pulled from boss.example.com/homepage.html&lt;br&gt;
&lt;br&gt;
Ultimately, I want to write a small shell page to place on fancyexample.com that &quot;hijacks&quot; the boss.example.com content in as seamless a way as possible.  I believe that this can be done very simple using javascript and a frame but I don&apos;t have much web programming experience.  &lt;br&gt;
&lt;br&gt;
Again, don&apos;t worry, my boss, boss.example.com, and fancyexample.com all know about this and approve completely.</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2007:site.69412</guid>
		<pubDate>Wed, 15 Aug 2007 17:25:07 -0800</pubDate>
		<dc:creator>jedicus</dc:creator>
		
			<category>html</category>
		
			<category>javascript</category>
		
			<category>webpage</category>
		
			<category>web</category>
		
			<category>page</category>
		
			<category>website</category>
		
			<category>site</category>
		
			<category>hijack</category>
		
			<category>resolved</category>
		
	</item> <item>
		<title>By: tmcw</title>
		<link>http://ask.metafilter.com/69412/How-do-I-legitimately-hijack-website-content#1036945</link>	
		<description>If you have DNS control, why not just make boss.fancyexample.com and point that to boss.example.com? That would involve less trickery and less browser risk.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.69412-1036945</guid>
		<pubDate>Wed, 15 Aug 2007 17:44:39 -0800</pubDate>
		<dc:creator>tmcw</dc:creator>
	</item><item>
		<title>By: Dub</title>
		<link>http://ask.metafilter.com/69412/How-do-I-legitimately-hijack-website-content#1036956</link>	
		<description>Something like this?&lt;br&gt;
(Replace braces with less-than / greater-than)&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;{!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Frameset//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd&quot;}&lt;br&gt;
&lt;br&gt;
{html}&lt;br&gt;
{head}&lt;br&gt;
{title}Title{/title}&lt;br&gt;
{meta name=&quot;keywords&quot; content=&quot;keywords, metalinks&quot; /}&lt;br&gt;
{meta name=&quot;description&quot; content=&quot;Description....&quot; /}&lt;br&gt;
{/head}&lt;br&gt;
{frameset rows=&quot;100%&quot;}&lt;br&gt;
{frame src=&quot;http://www.boss.example.com/&quot; title=&quot;Boss Example&quot; frameborder=&quot;0&quot; noresize=&quot;noresize&quot;/}&lt;br&gt;
{noframes}&lt;br&gt;
{body}&lt;br&gt;
{p}{a href=&quot;http://www.boss.example.com&quot;}http://www.fancyexample.com/{/a}{/p}&lt;br&gt;
{/body}&lt;br&gt;
{/noframes}&lt;br&gt;
{/frameset}&lt;br&gt;
{/html}&lt;/strong&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.69412-1036956</guid>
		<pubDate>Wed, 15 Aug 2007 18:00:22 -0800</pubDate>
		<dc:creator>Dub</dc:creator>
	</item><item>
		<title>By: scottreynen</title>
		<link>http://ask.metafilter.com/69412/How-do-I-legitimately-hijack-website-content#1036980</link>	
		<description>This is what &lt;a href=&quot;http://httpd.apache.org/docs/1.3/mod/mod_proxy.html&quot;&gt;mod_proxy&lt;/a&gt; is for. You could also write a proxy pretty easily in most scripting languages. Using mod_rewrite and PHP, for example, it&apos;s two one-line files, something like this:&lt;br&gt;
&lt;br&gt;
.htaccess:&lt;br&gt;
----&lt;br&gt;
RewriteRule ^(.*)$ /proxy.php?path=$1&lt;br&gt;
----&lt;br&gt;
&lt;br&gt;
proxy.php:&lt;br&gt;
----&lt;br&gt;
&amp;lt;? readfile( &apos;http://boss.example.com&apos; . $_GET[&apos;path&apos;] ); ?&amp;gt;&lt;br&gt;
----</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.69412-1036980</guid>
		<pubDate>Wed, 15 Aug 2007 18:59:42 -0800</pubDate>
		<dc:creator>scottreynen</dc:creator>
	</item><item>
		<title>By: Steven C. Den Beste</title>
		<link>http://ask.metafilter.com/69412/How-do-I-legitimately-hijack-website-content#1037158</link>	
		<description>I think you might be able to do this with &quot;&lt;a href=&quot;http://en.wikipedia.org/wiki/Server_Side_Includes&quot;&gt;server side includes&lt;/a&gt;&quot;. (Can&apos;t you use a full HTTP path with the &quot;direct&quot; parameter?)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.69412-1037158</guid>
		<pubDate>Wed, 15 Aug 2007 22:59:11 -0800</pubDate>
		<dc:creator>Steven C. Den Beste</dc:creator>
	</item><item>
		<title>By: jozxyqk</title>
		<link>http://ask.metafilter.com/69412/How-do-I-legitimately-hijack-website-content#1037238</link>	
		<description>Is there any reason you couldn&apos;t just mirror the whole boss.example.com site on the fancyexample.com server, and do it locally without any tricks?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.69412-1037238</guid>
		<pubDate>Thu, 16 Aug 2007 04:47:56 -0800</pubDate>
		<dc:creator>jozxyqk</dc:creator>
	</item><item>
		<title>By: kamelhoecker</title>
		<link>http://ask.metafilter.com/69412/How-do-I-legitimately-hijack-website-content#1037268</link>	
		<description>What &lt;b&gt;Dub&lt;/b&gt; suggested was trendy for a while. People would do it with their own sites so that the URL would be the same no matter what page you were on. (I guess people didn&apos;t want to show users &quot;confusing urls&quot; or allow them to bookmark anything except the front page.) So it&apos;s not a transparent, seamless solution.&lt;br&gt;
&lt;br&gt;
The SSI solution would work, but be a bit slow, since it would pull the content in real-time to the one webserver before sending it out to the browser. Might work fine though.&lt;br&gt;
&lt;br&gt;
If it&apos;s static content, you could do an rsync every hour or so (setup the 2 machines to connect via ssh without a password.)  but even if you rsync every minute, the content will always be a bit stale.&lt;br&gt;
&lt;br&gt;
the proxy is the most robust solution.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.69412-1037268</guid>
		<pubDate>Thu, 16 Aug 2007 06:03:34 -0800</pubDate>
		<dc:creator>kamelhoecker</dc:creator>
	</item><item>
		<title>By: goingonit</title>
		<link>http://ask.metafilter.com/69412/How-do-I-legitimately-hijack-website-content#1037700</link>	
		<description>If you&apos;re doing this, you have to be really, really careful about security. If you use the proxy solution, a malicious hacker couldn&apos;t craft a URL that appears to be from your Website, but actually goes to theirs -- allowing them (perhaps) to steal personal information by impersonating you. Additionally, you have to be very careful that you&apos;re not really running an open proxy. In general, the rule of thumb is never trust user input. If you&apos;re hacking off part of your URL and using it to construct a new one, this counts as user input now and you should make very, very sure that if it&apos;s something you don&apos;t expect, you deal with it safely. &lt;br&gt;
&lt;br&gt;
Cross-site scripting attacks are very hard to deal with. Most major companies get it wrong, and end up vulnerable. Please exercise caution.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2007:site.69412-1037700</guid>
		<pubDate>Thu, 16 Aug 2007 12:59:29 -0800</pubDate>
		<dc:creator>goingonit</dc:creator>
	</item>
	</channel>
</rss>
