httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Vogel <>
Subject [users@httpd] defining subdomains rewrite-rule outside of vhosts
Date Fri, 16 Nov 2007 17:40:00 GMT
Hey guys,

I am looking for a way to put my rewrite rule for subdomains outside of 
each virtual host into the global config to safe space and simplify my 
Here is what I tried. We own the domains, and And we give to our users. Our users are able 
to define subdomains like and those requests should 
go to the "sub"-folder.

Here is what I tried:
<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTP_HOST} 
!^(www.)?([a-z0-9-]+).(netgag|kilu[23]?).de$ [NC]
        RewriteCond %{HTTP_HOST} 
^(www.)?([a-z0-9-]+).([a-z0-9-]+).(netgag|kilu[23]?).de [NC]
        RewriteRule (.*) %2/$1 [L]

Unfortunately this doesn't work. The rewrite rule does not redirect a 
request to
Does anybody see the mistake?


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