How to point a domain name at a subdirectory [wordpress blog]
There are a million recipes out there that all promise to work, however I just spent about an hour following both these official instructions and instructions from forums I’ve never even been to before. Here’s, however, what finally worked for me:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteRule ^([^\.]+[^/])$ http://%{HTTP_HOST}/$1/ [R=301,L]
RewriteCond %{HTTP_HOST} ^(www\.)?domainname\.com$
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteRule ^(.*)$ subdirectory/$1 [L]
And yes, that fixes redirect_to problem when admin tries to log in but gets constantly redirected to a non-existent page.