httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bc. Radek Krejča <>
Subject [users@httpd] mod_rewrite together with mod_vhost_alias
Date Thu, 18 Dec 2003 01:44:34 GMT

  in apache 1.3.27 I used this:


RewriteEngine on
RewriteMap    lowercase       int:tolower
RewriteCond   ${lowercase:%{HTTP_HOST}}  ^[a-z0-9-]+\.[a-z0-9-]+$
RewriteRule   ^(.+)  ${lowercase:%{HTTP_HOST}}$1  [C]
RewriteRule   ^([a-z0-9-]+)\.([a-z0-9-]+)/(.*) /home/cz/$1.$2/www/$3
RewriteCond   ${lowercase:%{HTTP_HOST}} ^dbadmin\.[a-z0-9-]+\.[a-z0-9-]+$
RewriteRule   ^(.+)  ${lowercase:%{HTTP_HOST}}$1 [C]
RewriteRule   ^(dbadmin)\.([a-z0-9-]+)\.([a-z0-9-]+)/(.*) /home/$4
RewriteCond   ${lowercase:%{HTTP_HOST}} ^www\.[a-z0-9-]+\.[a-z0-9-]+\.[a-z0-9-]+$
RewriteRule   ^(.+)  ${lowercase:%{HTTP_HOST}}$1 [C]
RewriteRule   ^(www)\.([a-z0-9-]+)\.([a-z0-9-]+)\.([a-z0-9-]+)/(.*) /home/cz/$3.$4/$2/$5
#RewriteLogLevel 9
#RewriteLog "/var/www/logs/rewrite.log"
VirtualDocumentRoot /home/cz/%2+/%1

  and it runs perfectly. If no match rules, then was used virtual
  document root. But now I upgrade to 1.3.28 and this construction is
  not working and rewrite.log is empty (sure - without comment :-)).
  If I comment virtual document root, it starts work. How I can use
  mod_rewrite and mod_vhost_alias together again?

  I use OpenBSD 3.4 with Apache in distribution.


 Bc. Radek Krejča
 Starnet, s. r. o.
 ICQ: 65895541 

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