httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Vogel <samy-de...@gmx.de>
Subject [users@httpd] mod_rewrite question
Date Mon, 03 Sep 2007 16:47:00 GMT
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message