httpd-users mailing list archives

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

  in apache 1.3.27 I used this:

NameVirtualHost xxx.xxx.xxx.xxx

<VirtualHost xxx.xxx.xxx.xxx>
ServerName someserver.starnet.cz
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/starnet.cz/dbadmin3/$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
</VirtualHost>

  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.

  Thanks
  Radek

-- 
Regards,
 Bc. Radek Krejča
 Starnet, s. r. o.
 radek.krejca@starnet.cz
 http://www.ceskedomeny.cz
 http://www.skdomeny.com
 http://www.starnet.cz
 ICQ: 65895541 


---------------------------------------------------------------------
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