Hi,
I've been trying to do this for some time but can't figure out how.
Basically I want a setup where anyone at www.UserName.domain.com or
UserName.domain.com will have their DocumentRoot set to
/www/httpd/html/UserName. So far I've tried this:

<VirtualHost 111.111.111.111>
        UseCanonicalName Off
        <Perl>

                if($HTTP_HOST =~ s/(?:www\.)?(.*)\.domain\.com//g)
                {
                        $VirtualDocumentRoot = "/www/httpd/html/$1";
                }
                else
                {
                        $VirtualDocumentRoot = '/www/httpd/html/%-3';
                }
                
                1;

        </Perl>

</VirtualHost>

The second $VirtualDocumentRoot line works fine, but I NEED to be able to
get the first line to work instead, using <Perl> if possible.

Any guesses?

Jonathan

Reply via email to