Hello,
I'm trying to rewrite subdomains to user folders and rewriting the "rootdomain" to some other domain:
RewriteCond %{HTTP_HOST} ^mydomain\.tld [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.tld
RewriteRule ^(.*)
http://otherdomain\.tld [L]
RewriteCond %{HTTP_HOST} !^www\.mydomain.tld$
RewriteCond %{HTTP_HOST} ^([^.]+)\.mydomain\.tld$ [NC]
RewriteRule ^(/[^\s]+)?
http://www.mydomain\.tld/%1$1 [P,L]