title: Redirecting a URL that contains a question mark
body: <p>It's been necessary to move the position of my blog and I'm trying to make sure I catch all of the links in via the old link and redirect them to the new one.</p>
  
  <p>The blog has been moved from <a href="http://example.com/" rel="nofollow">http://example.com/</a> to <a href="http://example.com/blog/" rel="nofollow">http://example.com/blog/</a></p>
  
  <p>The URLs used to generate with the date before the post name (by default) which I've decided not to do, to keep the URLs memorable.</p>
  
  <p>The issue is that there's a ? character in the original URL (the default URL produced by the CMS I'm using and it's causing problems with the redirect:</p>
  
  <pre><code>RewriteRule ^post.php?s=2012-01-01-blog-post$ /blog/blog-post? [R=301,L]
  </code></pre>
  
  <p>So I need to escape the ? somehow but I can't work out how!</p>
  
  <p>I could use a more general redirect that avoids the ? but that would redirect to the listings page, not the article itself:</p>
  
  <pre><code>RewriteRule ^post.php$ http://tempertemper.net/blog/? [R=301,L] 
  </code></pre>
  
  <p>How do I make it read the ? as part of the URL!?</p>
  
  <p>Thanks for taking a look!</p>
  
  <p>Martin :)</p>