title: .htaccess Redirect from Subdirectory to Root
body: <p>We redesigned our site using Wordpress.  The original location of the old site was in a folder; www.domain.com/oldsite.  I'd like to redirect anyone landing in that folder to the root of the domain, where the new site is located. But, I need the redirect to strip off the filename from the end of the URL.</p>
  
  <p>www.domain.com/oldsite/contact.php redirects to www.domain.com</p>
  
  <p>I've tried the following, but it is non stripping the filename from the URL.</p>
  
  <pre><code>RewriteBase /
  RewriteRule ^old-directory/(.*)$ https://www.domain.com/ [R=301,NC,L]
  </code></pre>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks</p>