title: Google Reader Subscription URL
body: <p>I'm trying to create a link that allows a user to subscribe to a feed directly in Google Reader (bypassing the iGoogle option). I've tried several target URLs:</p>
  
  <ul>
  <li><a href="http://www.google.com/reader/view/feed/feed-url" rel="nofollow noreferrer">http://www.google.com/reader/view/feed/feed-url</a></li>
  <li><a href="http://www.google.com/ig/addtoreader?feedurl=feed-url" rel="nofollow noreferrer">http://www.google.com/ig/addtoreader?feedurl=feed-url</a></li>
  </ul>
  
  <p>Each seems to work as expected most of the time, but I've bumped into a couple of feeds that don't. The deviating factor seems to be that the URLs that don't work all have a query string of their own. One example is <a href="http://majicjungle.com/blog/?feed=atom" rel="nofollow noreferrer">http://majicjungle.com/blog/?feed=atom</a>.</p>
  
  <p>What's even more strange to me is that these seem to work the very first time I try to subscribe, but if I close the window and return to the same URL, it doesn't. I'm encoding the feed URI before redirection so I have:</p>
  
  <p><code>window.location.replace( 'http://www.google.com/reader/view/feed/' + encodeURIComponent( feed_uri ) );</code></p>
  
  <p>The first time I redirect, I end up at <code>http://www.google.com/reader/view/feed/http%3A%2F%2Fblog.squirrelapp.com%2F%3Ffeed%3Drss2</code> with the URI components encoded as expected. If I close that window and go through the exact same steps, though, I end up at <code>http://www.google.com/reader/view/feed/http://blog.squirrelapp.com/?feed=rss2#stream/feed%2Fhttp%3A%2F%2Fblog.squirrelapp.com%2F</code>.</p>
  
  <p>Not only is the feed URL decoded, but there's also a very obvious redirection happening at the Google Reader end. This happens every time after the first. Has anyone else had this experience, know what's happening and/or know how to fix it?</p>
  
  <p>I've been working the trial and error method (combined with many, many searches) for days now and I keep coming up on the error side of things. Any help or insight would be much appreciated.</p>