httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@engelschall.com (Ralf S. Engelschall)
Subject Re: Virtual Hosting w/ mod_rewrite \(complete solution\?\)
Date Fri, 27 Feb 1998 15:01:37 GMT

In article <XFMail.980227144627.sfx@unix-ag.org> you wrote:
> According to Ralf S. Engelschall:

>>  -----------------------------------
>> ##
>> ##  vhost.map 
>> ## 
>>  www.vhost1.dom:80  /path/to/docroot/vhost1
>>  www.vhost2.dom:80  /path/to/docroot/vhost2
>>       :
>>  www.vhostN.dom:80  /path/to/docroot/vhostN
>>  -----------------------------------

> Hmm... why do we need a map?
> If the "/path/to/docroot" is common for all vhosts
> I would simply use the domainname as a subdirectory and rewrite
> "www.vhost1.dom" to "/path/to/docroot/vhost/www.vhost1.dom".

> Or I'm missing something?

It was just an example. I used the map because it provides maximum
flexibility. The approach with the common prefix was already mentioned by
Dean. We could use a ``RewriteCond ... -d'' to check if the virtual host is
valid.
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message