title: mod_rewrite redirect directory to parent directory
body: <p>Recently I moved my site to Amazon EC2 instance. I want to redirect requests for</p>
  
  <pre><code>http://www.domain.com/data/
  to
  http://www.domain.com
  </code></pre>
  
  <p>so any previous paths in the old website like</p>
  
  <p><code>http://www.domain.com/data/kjk/sds/sds/index.html</code> should become <code>http://www.domain.com/kjk/sds/sds/index.html</code></p>
  
  <p>I have tried a couple of mod_rewrite rules using htaccess</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  RewriteRule ^data/. / [R=301,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Any ideas?</p>