httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Vogel <>
Subject [users@httpd] mod_rewrite question
Date Mon, 03 Sep 2007 16:47:00 GMT

I have 3 domains with various subdomains. The domains are, and
I want that all requests to [www.] or [www.] are 
redirected to [www.]
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\$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 But 
only and should be redirected and also [www.]!

Any help would be appreciated!


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message