title: Wordpress redirect to subdirectory - wp-admin forwards to wrong login url
body: <p>I moved a Wordpress site to a new server.  The site is installed in a subdirectory and the .htaccess in the root forwards to it like so:</p>
  
  <pre><code> RewriteEngine On
   RewriteCond $1 !(^wpfolder/)
   RewriteRule ^(.*)$ wpfolder/$1 [L]
  </code></pre>
  
  <p>I've changed the site_url and home entries in the wp_options table in the database.  Everything is working fine - except if I visit site.com/wp-admin to login - it redirects to the login page like so:</p>
  
  <p>site.com/wp-login.php?redirect_to=http%3A%2F%2Fsite.com%2Fwpfolder%2Fwp-admin%2F&amp;reauth=1
  (notice the 'wpfolder' in the redirect_to value)</p>
  
  <p>When I enter the correct username and password, nothing happens and I get the login box again.  I can log in no problem by visiting site.com/wp-login.php - but I'd really like to solve this redirect problem if possible.</p>