title: .htaccess: Check if query string has a certain value or else redirect it
body: <p>I'm trying to learn a bit of .htaccess and am really anxious on what it can do. I saw a snippet online but can't get it to work, it basically goes like this <strong>If a query string does not have a certain value, redirect it to index.php</strong> instead or some other page. How do I do that?</p>
  
  <p>This looks for the value <em>apples</em>:</p>
  
  <pre><code>www.domain.com/somefile.php?a=apples&amp;b=xyz
  </code></pre>
  
  <p>This will redirect to index.php instead:</p>
  
  <pre><code>www.domain.com/somefile.php?a=stinkycheese&amp;b=xyz
  </code></pre>