title: Error with my htaccess redirect matching incorrect URL
body: <p>Here are the redirects in my htaccess file</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{HTTP_HOST} !^www\.
  RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
  RewriteRule ^project/(.*)$ /service/$1 [R=301,NC,L]
  RewriteCond %{QUERY_STRING} name
  RewriteRule ^$ /? [R=301,L]
  RewriteCond %{QUERY_STRING} p
  RewriteRule ^$ /? [R=301,L]
  </code></pre>
  
  <p>The problem I'm having is that it is interfering with a particular url.</p>
  
  <p>Instead of getting:</p>
  
  <p><a href="http://www.example.com/wp-admin/admin.php?gf_page=select_columns&amp;id=1&amp;TB_iframe=true&amp;height=365&amp;width=600" rel="nofollow">http://www.example.com/wp-admin/admin.php?gf_page=select_columns&amp;id=1&amp;TB_iframe=true&amp;height=365&amp;width=600</a></p>
  
  <p>I'm getting:</p>
  
  <p><a href="http://www.example.com/?gf_page=select_columns&amp;id=1&amp;TB_iframe=true&amp;height=365&amp;width=600" rel="nofollow">http://www.example.com/?gf_page=select_columns&amp;id=1&amp;TB_iframe=true&amp;height=365&amp;width=600</a></p>
  
  <p>I see that the url parameter has the word "page" in it.</p>
  
  <p>I'm wondering if my redirect is not an exact match, and therefore matching the "p" in the word "page".  </p>
  
  <pre><code>RewriteCond %{QUERY_STRING} p
  </code></pre>
  
  <p>If that is (in fact) the problem, how can I make the query_string an exact match?</p>
  
  <p>That rewrite condition is supposed to only grab query strings from the root level of the domain that match exactly with p.</p>
  
  <p>If that is not the problem, any other ideas?</p>