Re: mod_rewrite question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

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: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux