First I'd like to say thanks for responding. I understand most of what you kicked out in there. With respect to mod rewrite triggering before vhost_alias, I was wondering if it's possible to have mod rewrite just handle the one domain (by a given domain name). That is, can you limit the rewrite condition to just one domain? I don't know much about regexp so please forgive me on this... RewriteMap lowercase int:tolower RewriteCond %{HTTP_HOST} !^$ RewriteCond ${lowercase:%{HTTP_HOST}|NONE} ^http://www.averyparticularserver.com$ RewriteCond /exports/home/%2.%3/users/domain_$1 -d RewriteRule ^/([^\/]+)(.*)$ /exports/home/%2.%3/users/domain_$1$2 [L] If we limited it to just the one domain, wouldn't virtual still work as expected? > -----Original Message----- > From: Axel-Stéphane SMORGRAV [mailto:Axel- > Stephane.SMORGRAV@xxxxxxxxxxxxxx] > Sent: Friday, April 21, 2006 5:20 AM > To: users@xxxxxxxxxxxxxxxx > Subject: RE: [users@httpd] rewrite and virtualdocumentroot question > > I am afraid that mod_rewrite will process the request *before* > mod_vhost_alias. Therefore, in order to achieve what you want, I think you > will need to abandon mod_vhost_alias and rely solely on mod_rewrite. > > For the user directories, maybe: > > RewriteMap lowercase int:tolower > > RewriteCond %{HTTP_HOST} !^$ > RewriteCond ${lowercase:%{HTTP_HOST}|NONE} ^(.*)\.([^.]+)\.([^.]+)$ > RewriteCond /exports/home/%2.%3/users/domain_$1 -d > RewriteRule ^/([^\/]+)(.*)$ /exports/home/%2.%3/users/domain_$1$2 [L] > > In the last RewriteCond we test whether a directory exists under > /exports/home/domain.tld/ named the same as the first component of the > requested URL path. > > I think the following should be equivalent to "VirtualDocumentRoot > /exports/home/%-2.0.%-1/virtualdomains/%0": > > RewriteCond %{HTTP_HOST} !^$ > RewriteCond ${lowercase:%{HTTP_HOST}|NONE} ^(.*)\.([^.]+)\.([^.]+)$ > RewriteRule ^(.*)$ /exports/home/%2.%3/virtualdomains/%1.%2.%3$1 > > Wrt the ScriptAlias, I thinks you may resolve it using a combination of > DirectoryMatch, add-handler and Options. > > For the user directories, you may want to disable mod_userdir and > incorporate the ~ syntax in the above rewrite rule. > > Try the above rules, set "RewriteLogLevel 3", set the RewriteLog to an > appropriate value and check out the resulting path names. > > -ascs > > > ________________________________ > > From: Gary W. Smith [mailto:gary@xxxxxxxxxxxxxxx] > Sent: Thursday, April 20, 2006 8:41 PM > To: users@xxxxxxxxxxxxxxxx > Subject: [users@httpd] rewrite and virtualdocumentroot question > --------------------------------------------------------------------- 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