title: How to NOT match a word in mod_rewrite
body: <p>Please help, I'm going crazy!</p>
  
  <pre><code>RewriteRule ^([a-z0-9_-]+)?/?search/?$ search.php?id=$1&amp;%{QUERY_STRING} [NC,L]
  </code></pre>
  
  <p>This is my current code. Sometimes people will visit mysite.com/search, other times they will visit mysite.com/boris/search and I detect a user with an empty($_GET['id']) check.</p>
  
  <p>However I am creating another search, mysite.com/products/search which leads to products_search.php</p>
  
  <p>I need my original RewriteRule to match any user EXCEPT the word 'products'.</p>
  
  <p>I have tried so many combinations.</p>
  
  <pre><code>RewriteRule ^(!products&amp;[a-z0-9_-]+)?/?search/?$ search.php?id=$1&amp;%{QUERY_STRING} [NC,L]
  </code></pre>
  
  <p>I'm not very good with regex/mod_rewrite but I something like the above should work? I just need an AND operator as clearly &amp; doesn't work, but I can't find one!</p>
  
  <p>Many thanks in advance.</p>