Samuel Vogel wrote:
Hey,

I have 3 domains with various subdomains. The domains are kilu.de, kilu2.de and kilu3.de I want that all requests to [www.]kilu2.de or [www.]kilu3.de are redirected to [www.]kilu.de. Now I'm looking for the best mod_rewrite solution. Here is what I got right now:

   RewriteEngine On
   RewriteCond %{HTTP_HOST} ^([^.]+)\.kilu2\.de
   RewriteRule ^(.*)$  http://%1\.kilu.de/$1 [L]

This unfortunately has 2 Problems:
1. It doesn't work at all ;)
2. It would only redirect every subdomain of and only of kilu2.de. But only www.kilu2.de and kilu2.de should be redirected and also [www.]kilu3.de!

Any help would be appreciated!

Regards,
Samy

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Probably easier to just use ServerAlias

ServerName kilu.de
ServerAlias www.kilu.de kilu2.de www.kilu2.de kilu3.de www.kilu3.de


Norm



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to