title: Remove directory from URL with
body: <p>I am moving a Magento site from example.com/shopping to example.com and I have to 301 redirect all of the URLs to the new location (example.com). I am assuming I can use mod_rewrite in the .htaccess file to create a rewrite rule to do this? I tried to learn how to use mod_rewrite, but the syntax is so complex for me.</p>
  
  <p>There are hundreds of pages that need to be redirected. Example:</p>
  
  <pre><code>http://www.example.com/shopping/product-category-1/product-sub-category.html
  </code></pre>
  
  <p>TO</p>
  
  <pre><code>http://www.example.com/product-category-1/product-sub-category.html
  </code></pre>
  
  <p>This is so that people don't end up with a 404 error when they enter the site via an old URL.</p>