title: Redirect URL using Query String parameter in URL
body: <p>I have a bunch of URLs from an old site that I recently updated to EE2.  These URLs look like this:<br>
  <a href="http://www.example.com/old/path.asp?dir=Folder_Name" rel="nofollow">http://www.example.com/old/path.asp?dir=Folder_Name</a></p>
  
  <p>These URLs will need to redirect to:<br>
  <a href="http://www.example.com/new_path/folders/folder_name" rel="nofollow">http://www.example.com/new_path/folders/folder_name</a></p>
  
  <p>Not all <code>Folder_Name</code> strings match up with <code>folder_name</code> URL segments, so these will most likely need to be static redirects.</p>
  
  <p>I tried the following Rule for a particular folder called "Example_One" which maps to a page on the new site called "example1":</p>
  
  <pre><code>Redirect 301 /old/path.asp?dir=Example_One
               http://www.example.com/new_path/folders/example1
  </code></pre>
  
  <p>But this doesn't work. Instead of redirecting I just get a 404 error telling me that <a href="http://www.example.com/old/path.asp?dir=Example_One" rel="nofollow">http://www.example.com/old/path.asp?dir=Example_One</a> cannot be found.</p>
  
  <p><strong>EDIT:</strong><br>
  There's a secondary problem here too which may or may not be related:  I have a catch-all rule that looks like this:<br>
  redirect 301 /old/path.asp  <a href="http://www.example.com/new_path" rel="nofollow">http://www.example.com/new_path</a></p>
  
  <p>Using the rule, requests like the first one above will be redirected to:<br>
  <a href="http://www.example.com/new_path?dir=Folder_Name" rel="nofollow">http://www.example.com/new_path?dir=Folder_Name</a><code></code>which triggers a 404 error.</p>