httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krist van Besien" <>
Subject Re: [users@httpd] how to replace tilde with slash when users' home dirs are different?
Date Wed, 14 Feb 2007 09:59:09 GMT
On 2/14/07, ccyen <> wrote:
> Hi
>      I want to replace the tilde symbol with slash in the URL,
> And I know that I could add this setting
> "AliasMatch ^/([^/]*)/?(.*) /home/$1/public_html/$2"
> when all users' root directory are the same.
> Now it's the problem...
>      There are more than 5000  users in my server,
> in order to avoid that all users' dirs stored in one root directory,
> their root home directories are separated to 4 parts:
> user1,user2,user3 and user4
> So,the user's home directory is "/user[1or2or3or4]/USERNAME/public_html/"
> Now I can't find any solution with "rewrite setting" to solve my problem.

The way I would solve this is have the users spread over more than
four dirs, like this:

and so on, al the way to z.

Than have all your users whose username starts with a in /users/a/ and
so on. So ccyen would have hist homedir in /users/c/ccyen.

You can than use an AliasMatch like this:

 "AliasMatch ^/([^/])([^/]*)/(.*) /users/$1/$1$2/public_html/$3"


Bremgarten b. Bern, Switzerland
"...what you don't realize is that in the future Google WILL reach
sentience, will [have had] invent[ed] a time machine, and will [have
had] travel[ed] back in time to prevent Bill Gates... only to become
Bill Gates by accident because of a search engine optimization
miscalculation." (Comment on the Dilbert Blog)

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

View raw message