You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Gary W. Smith" <ga...@primeexalia.com> on 2006/04/20 20:40:35 UTC

[users@httpd] rewrite and virtualdocumentroot question

We are running the following in the httpd.conf file.  This works well
for our virtual domain hosting.  

VirtualDocumentRoot /exports/home/%-2.0.%-1/virtualdomains/%0
VirtualScriptAlias /exports/home/%-2.0.%-1/virtualdomains/%0/cgi-bin

For the users we have a prefix as part of their username.  For example,
the domain domain.tld might have the following prefix domain_ so the
user accounts would look like domain_bob, domain_john, etc.

We have a need to strip the this prefix off for a particular domain that
we are hosting and expose their home directory.  The users home
directories are always under a partitular path:

/exports/home/domain.tld/users/prefix_username

What we would like to do is have all traffic for /bob to go to the
folder /exports/home/domain.tld/users/domain_bob.  The second part of
this is that we only want this to happen for domain.tld, not domain2.tld
or domain3.tld.

Is this possible?  If so, how would I approach this?  

I figure the first part of the equation is getting /domain_bob to map to
/exports/home/domain.tld/users/domain_bob but I don't know how to do
this when we are running VirtualDocumentRoot.

It should also be noted that there is no content on this particular
virtual host.  It was specifically create for the purposes of putting
home directories on the network.

Any help would be greatly appreciated.

Gary Smith