I've been reading docs and stackoverflow questions for the past hour trying to figure this out. I'm not experienced with .htaccess but I do have a programming background.
Here is my current .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} domainA.com/$ [NC]
RewriteRule ^(.*)$ http://domainB.com/$1 [R=301,NC,QSA,NE]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
When I go to http://domainA.com, it directs me to http://domainB.com.. good.
But when I go to http://domainA.com/some_page/, I get redirected to http://domainB.comsome_page/
Why am I losing the /? It seems to be in the rule. Removing the RewriteBase didn't work (not sure why it would, but I'm trying everything).