defining subdomains rewrite-rule outside of vhosts

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

 



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 configuration. Here is what I tried. We own the domains kilu.de, kilu2.de and netgag.de. And we give username.kilu.de to our users. Our users are able to define subdomains like sub.username.kilu.de 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]
</IfModule>

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

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


[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