domain redirection with virtualhost

Solution 1:

DocumentRoot is not required. You can set up vhosts like this without any problems:

 <VirtualHost xx.xx.xx.xx:90>
  ServerName domain.tld
  ServerAlias www.domain.tld
  RedirectPermanent / http://www.domain2.com/
 </VirtualHost>

This will redirect all requests to the main site but also subfolders. E.g. www.domain.tld/foo/bar will be redirected to www.domain2.com/foo/bar

ServerAlias is only required if you want several hostnames.. Such as both www and without www.

Solution 2:

You have mixed up .com and .de in your example configuration. Could this be the problem?

Question 1:

RewriteCond %{HTTP_HOST} ^.*\.test1\.de [NC]
RewriteRule ^(.*)$ http://www.test.de/$1 [L,R=301]

Question 2:
I'm not a 100% sure if a DocumentRoot is required or not, but I think no.

Question 3: Yes, you need the *.test1.com Alias.
It might work without it if this VirtualHost is your first VirtualHost.
It would then get all requests that did not match any other VirtualHosts as it is the default.
However it's cleaner to configure it.

Solution 3:

Try something like this in your virtualhost:

<Virtualhost XXX.XXX.XXX.XXX:80>    
     ServerName www.test1.com
     ServerAlias *.test1.com
     Redirect 301 / http://www.test.com
</VirtualHost>

Very basic and should transfer anything regardless of what url the user is trying to access from test1.com to test.com.