I've got a shared hosting account with 3 separate domains on it. Each site is in its own directory, so via .htaccess there is a rewrite for each domain name to the corresponding folder.
When I try to log in to WP, the redirect URL that shows up in the address bar has the domain's folder in it.
Ex: www.domain1.com is under folder /domain1
Login redirect after login is http://www.domain1.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.domain1.com%2Fdomain1%2Fwp-admin%2F&reauth=1
So it just brings me back to the login screen with no error message or anything...if I reset the password, however, I can log in successfully. But upon logout I get in the redirect loop again.
EDIT - this code is in .htaccess located in /public_html/
. There is also another .htaccess inside /public_html/domain1/
with the standard Wordpress lines.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.*)domain1.com$ [NC]
RewriteRule ^(.*)$ /domain1/$1 [L]
RewriteCond %{HTTP_HOST} ^(.*)domain2.com$ [NC]
RewriteRule ^(.*)$ /domain2/$1 [L]
RewriteCond %{HTTP_HOST} ^(.*)domain3.com$ [NC]
RewriteRule ^(.*)$ /domain3/$1 [L]
.htaccess
to associate the domains with the directories? That’s wrong, you should do that inhttpd-vhosts.conf
.