Q:

Use .htaccess to redirect with any appended text transferred to new redirect

I'm a little stuck. I have the following redirect in .htaccess
Redirect http://www.domain1.com http://www.domain2.com/subdomain=

Although I want that if someone types www.domain1.com/12345, it will automatically append the 12345 to the redirect URL on redirect so it will go to www.domain2.com/subdomain=12345.
i.e. whatever they append to the original, will be appended to the new redirect (without a / before it).

A:

You should use RedirectMatch instead of Redirect. See manual

Resource Moved to Another Server
#With RedirectMatch RedirectMatch "^/docs/(.*)" "http://new.example.com/docs/$1"

In your case:
RedirectMatch ^/(.*)$ http://www.domain2.com/subdomain=$2

