title: mod-rewrite to remove a folder
body: <p>I have the following URL </p>
  
  <p><a href="http://www.example.com/folder1/folder2/file.php" rel="nofollow">http://www.example.com/folder1/folder2/file.php</a> </p>
  
  <p>I want to redirect it to </p>
  
  <p><a href="http://www.example.com/demo/folder1/file.php" rel="nofollow">http://www.example.com/demo/folder1/file.php</a> </p>
  
  <p>I tried this, but it does not work:</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} www.example.com 
  RewriteCond %{REQUEST_URI} ^folder 
  RewriteRule /demo/folder(.*)  /folder1/folder2/$1  
  </code></pre>