httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: need a more general solution
Date Sat, 16 Mar 2002 00:01:06 GMT
Casas, Claudia wrote:

> I will read more about the reference you suggested, I am sure I will find
> out more tricks. As you already had mentioned to me, I actually cannot view
> my documentroot. I would really appreciate if you could help me out with
> this. My documentroot is going to be one of the accounts in my /home
> directory, but if it is necessary, I can put it in the apache directory as
> well. Now, it is located in /home/main/www
> DocumentRoot "/home/main/www"
> I would like to be able to access the above directory just by typing :

There are a number of ways to do this, none of them particulary easy or 

1. Enumerate all the users, either the way you were doing it with Alias, 
or using an external RewriteMap.  Then any requests that do not match 
one of the listed users will go to the documentroot.

2. If you only need to access hosts under the exact documentroot 
directory, and not any subdirectories of that directory., you can 
arrange an AliasMatch or RewriteRule to do that.  For example:
AliasMatch ^/([^/.]+)/?(.*)$ /home/$1/$2
This should match any request that does not have a "." before the first 
slash.  That way you could have index.html, other.html, etc, in your 
documentroot, but you couldn't have any subdirectories (unless you 
included a "." in the subdirectory name.

3. Have mod_rewrite test to see if a user directory associated with the 
request can be found.  This would potentially be quite complicated, but 
should be possible.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message