httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] how to replace tilde with slash when users' home dirs are different?
Date Wed, 14 Feb 2007 14:16:47 GMT
On 2/14/07, Krist van Besien <krist.vanbesien@gmail.com> wrote:

> The way I would solve this is have the users spread over more than
> four dirs, like this:
>
> /users/a/
> /users/b/
> 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"

Not a bad idea.  But if the location of your home directories is
already fixed and unchangeable, some alternatives:

1. Create a dbm file mapping username to directory and then use
mod_rewrite with RewriteMap to do the mapping.
2. Hack mod_userdir to not require the tilde.

The last one is probably the simplest solution if you know a little C
programming.

Joshua.

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message