title: .htaccess redirect FROM subfolder to domain name
body: <p>I had website content in a subfolder (<a href="http://mydomain.com/subfolder/index.php" rel="noreferrer">http://mydomain.com/subfolder/index.php</a>), now I copied everything over to the root folder (<a href="http://mydomain.com/index.php" rel="noreferrer">http://mydomain.com/index.php</a>).</p>
  
  <p>I would like to redirect all the visitors that have bookmarked the old page to the new content (at least to the new index.php) using .htaccess.</p>
  
  <p>Is this correct:</p>
  
  <pre><code>RewriteEngine on
  RewriteRule /subfolder/^(.*)$ http://mydomain.com [R=301,L]
  </code></pre>
  
  <p>?</p>
  
  <p>And where would I place the .htaccess file, in the subfolder or the root folder?</p>