<?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 to link to the contents of another link?</title>
	<link>http://ask.metafilter.com/98271/How-to-link-to-the-contents-of-another-link/</link>
	<description>Comments on Ask MetaFilter post How to link to the contents of another link?</description>
	<pubDate>Mon, 04 Aug 2008 09:29:40 -0800</pubDate>
	<lastBuildDate>Mon, 04 Aug 2008 09:29:40 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: How to link to the contents of another link?</title>
		<link>http://ask.metafilter.com/98271/How-to-link-to-the-contents-of-another-link</link>	
		<description>Is there a way for a hyperlink to simply &apos;parrot&apos; whatever a second hyperlink might be pointing toward? &lt;br /&gt;&lt;br /&gt; The overly simplified version of my situation would go something like this:  &lt;br&gt;
&lt;br&gt;
I have set up LinkA on Page1 to point toward a given file.  I also need LinkB on Page2 to point toward this same file.  The file however, and it&apos;s name, will change quite often.  &lt;br&gt;
&lt;br&gt;
Is there a way to set up LinkB to simply mimic/mirror/imitate whatever LinkA is pointing toward, so that all I ever need to do is to update the properties of LinkA?</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2008:site.98271</guid>
		<pubDate>Mon, 04 Aug 2008 09:24:55 -0800</pubDate>
		<dc:creator>mathis23</dc:creator>
		
			<category>HTML</category>
		
			<category>Internet</category>
		
			<category>Web</category>
		
			<category>Development</category>
		
			<category>Link</category>
		
			<category>Hyperlink</category>
		
	</item> <item>
		<title>By: inigo2</title>
		<link>http://ask.metafilter.com/98271/How-to-link-to-the-contents-of-another-link#1431045</link>	
		<description>Can you set up Page 3 to be an automatic redirect to the file, and then have LinkA and LinkB just point to that page? That way, LinkA and LinkB never need to be updated; to update the actual link to the file, you just have to change Page 3.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.98271-1431045</guid>
		<pubDate>Mon, 04 Aug 2008 09:29:40 -0800</pubDate>
		<dc:creator>inigo2</dc:creator>
	</item><item>
		<title>By: le morte de bea arthur</title>
		<link>http://ask.metafilter.com/98271/How-to-link-to-the-contents-of-another-link#1431052</link>	
		<description>Alternatively, use a function in an external javascript. Call this function from your two pages.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.98271-1431052</guid>
		<pubDate>Mon, 04 Aug 2008 09:35:40 -0800</pubDate>
		<dc:creator>le morte de bea arthur</dc:creator>
	</item><item>
		<title>By: askmehow</title>
		<link>http://ask.metafilter.com/98271/How-to-link-to-the-contents-of-another-link#1431055</link>	
		<description>Is it possible to give the link target (the file) a standard name, and then archive the files that no longer need to be referenced?&lt;br&gt;
&lt;br&gt;
What tools are you using?  Straight HTML?  In any case this is going to be maintenance nightmare. You may want to look into server side scripting or an application platform.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.98271-1431055</guid>
		<pubDate>Mon, 04 Aug 2008 09:36:31 -0800</pubDate>
		<dc:creator>askmehow</dc:creator>
	</item><item>
		<title>By: katrielalex</title>
		<link>http://ask.metafilter.com/98271/How-to-link-to-the-contents-of-another-link#1431085</link>	
		<description>Off the top of my head, the easiest way would be to use a basic PHP request -- so, say, make server/file.php refer to the file and update this link serverside. Other ways:&lt;br&gt;
&lt;br&gt;
- Make all your pages php and use includes to stick the URL of the file there.&lt;br&gt;
&lt;br&gt;
- If you must do it clientside you need javascript and some way of fetching the content of Page1 from Page2; either an AJAX server request or an empty iframe with Page1 in. Ugh</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.98271-1431085</guid>
		<pubDate>Mon, 04 Aug 2008 09:54:58 -0800</pubDate>
		<dc:creator>katrielalex</dc:creator>
	</item><item>
		<title>By: drjimmy11</title>
		<link>http://ask.metafilter.com/98271/How-to-link-to-the-contents-of-another-link#1431204</link>	
		<description>&lt;em&gt;Alternatively, use a function in an external javascript. Call this function from your two pages.&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
This by far the easiest and most practical solution. You already have some kind of &quot;scripts.js&quot; file included everywhere, right? Most decent sized websites do.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.98271-1431204</guid>
		<pubDate>Mon, 04 Aug 2008 11:02:08 -0800</pubDate>
		<dc:creator>drjimmy11</dc:creator>
	</item><item>
		<title>By: hattifattener</title>
		<link>http://ask.metafilter.com/98271/How-to-link-to-the-contents-of-another-link#1431303</link>	
		<description>PHP/Ajax/Javascript seems like total overkill to me. Some simpler ideas:&lt;br&gt;
&lt;br&gt;
Symlink the file that LinkB would normally point to to LinkA&apos;s file. Symlink LinkA&apos;s file to the real file and update when needed.&lt;br&gt;
&lt;br&gt;
Put a line in your .htaccess (or httpd.conf, if you run the whole server) along the lines of &quot;&lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirect&quot;&gt;Redirect&lt;/a&gt; temp LinkBPath LinkA&quot;.&lt;br&gt;
&lt;br&gt;
Use &lt;a href=&quot;http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html&quot;&gt;mod_rewrite&lt;/a&gt; to change LinkB into LinkA when server sees a request. (Mod_rewrite is big, but doesn&apos;t have to be complex to use; &lt;a href=&quot;http://httpd.apache.org/docs/2.0/rewrite/rewrite_guide.html#content&quot;&gt;some recipes are here&lt;/a&gt;.)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.98271-1431303</guid>
		<pubDate>Mon, 04 Aug 2008 12:00:38 -0800</pubDate>
		<dc:creator>hattifattener</dc:creator>
	</item><item>
		<title>By: ook</title>
		<link>http://ask.metafilter.com/98271/How-to-link-to-the-contents-of-another-link#1431367</link>	
		<description>I&apos;m guessing that most people who don&apos;t live and breathe the command line are going to find it a lot easier to edit a .js file than to muck about with symbolic links or apache configuration files.&lt;br&gt;
&lt;br&gt;
In your javascript file, which you edit as needed:&lt;br&gt;
function foo() {window.location.href=&apos;http://your.constantly.changing.url&apos;;}&lt;br&gt;
&lt;br&gt;
The links, which you never need to edit:&lt;br&gt;
&amp;lt;a href=&quot;#&quot; onclick=&quot;foo();&quot;&amp;gt;click&amp;lt;/a&amp;gt;&lt;br&gt;
&lt;br&gt;
That&apos;s all that would be required.&lt;br&gt;
&lt;br&gt;
If you have a lot of these, it&apos;s probably worth looking at a serverside solution (or, better yet, find a way to stop renaming the file all the time)  but for a quick one-off hack, this would work fine.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.98271-1431367</guid>
		<pubDate>Mon, 04 Aug 2008 12:46:55 -0800</pubDate>
		<dc:creator>ook</dc:creator>
	</item>
	</channel>
</rss>
