...the MAYBE-dup answer does solve my problem, but the question doesn't.
Do TWO things:
Keep subdomain before
Keep path after
I can't find ONE .htaccess
or Apache config that does BOTH anywhere on SE or elsewhere on the web:
Via Apache .htaccess
rewrite, forward the old domain, but keep BOTH the same subdomain
AND path/after
.
From:
samesubdomain.
domain1.tld1
/same/path
To:
samesubdomain.
domain2.tld2
/same/path
I have many subdomains AND trailing addresses. I am migrating an old site, but need my old subs and their pages to still work on the new domain.
Not-but-close duplicates: (The answers address my problem, but the question itself does not describe my problem, but this solved my problem also.)
Redirect wildcard subdomain to same subdomain on different domain
Courtesy the MAYBE-dup answer, for the subdomain, I currently have:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.+\.)?domain1.com$ [NC]
RewriteRule ^ http://%1domain2.com%{REQUEST_URI} [R=301,L]
...now, I need to add the/path
half WITHOUT conflicting with this code.