title: How to use .htaccess to redirect / to subdirectory
body: <p>I am really confused by the grammar of .htaccess, so I come to ask for some help.</p>
  
  <p>I have a website, let's say, <code>www.example.com.</code></p>
  
  <p>I want to use .htaccess file to redirect <code>www.example.com</code> to <code>www.example.com/newsite/</code> except for <code>www.example.com/keepit/</code></p>
  
  <p>I mean, like  </p>
  
  <p><code>example.com</code> => <code>example.com/newsite</code></p>
  
  <p><code>example.com/blabla/bla</code> => <code>example.com/newsite/blabla/bla</code></p>
  
  <p>But <code>example.com/keepit/blabla</code> stays the same as <code>example.com/keepit/blabla</code></p>
  
  <p>I try to use .htaccess like this</p>
  
  <pre><code>RewriteEngine on
  
  RewriteCond %{REQUEST_URI} !^/keepit/$
  RewriteRule ^(.*)$ /newsite/$1 [R=301,L]
  </code></pre>
  
  <p>It work to change the / to /newsite, but it failed in the need of omitting /keepit</p>