title: .htaccess redirect for parent but not children?
body: <p>I have a number of URLs that I need to redirect to new locations, but there are some situations where child pages need to remain active and not redirected. For example:</p>
  
  <p><code>/products</code> would redirect to <code>http://www.newsite.com/products</code></p>
  
  <p><code>/products/category1</code> would redirect to <code>http://www.newsite/products/category1</code></p>
  
  <p><strong>But</strong> <code>/products/specialitem</code> would not get redirected at all.</p>
  
  <p>Is this possible with either Redirect or RedirectMatch?</p>
  
  <p>Doing a <code>Redirect 301 /products http://www.newsite.com/products</code> seems to affect all child pages</p>
  
  <p>Thanks for any guidance!</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Using waynethec's answer, I was able to get started. But can anyone clarify why my first rule below works but the others do not?</p>
  
  <p><code>RedirectMatch 301 ^segment-one$ http://www.google.com/</code></p>
  
  <p><code>RedirectMatch 301 ^segment-one/segment-two$ http://news.google.com/</code></p>
  
  <p><code>RedirectMatch 301 ^segment-one/segment-two/segment-three$ http://cnn.com/</code></p>
  
  <p><code>RedirectMatch 301 ^segment-one/segment-two/segment-three/foobar$ http://gbv.com/</code></p>
  
  <p>(By not working, I mean that I still can get to the pages, rather than them getting redirected.)</p>