# Module mod_userdir

This module is contained in the `mod_userdir.c` file, and is compiled in by default. It provides for user-specific directories.

- UserDir

## UserDir

Syntax: UserDir directory/filename
Default: `UserDir public_html`
Context: server config, virtual host
Status: Base
Module: mod_userdir

The UserDir directive sets the real directory in a user's home directory to use when a request for a document for a user is received. Directory is either `disabled`, to disable this feature, or the name of a directory, following one of the following patterns. If not disabled, then a request for `http://www.foo.com/~bar/one/two.html` will be translated to:

    UserDir public_html     -> ~bar/public_html/one/two.html
    UserDir /usr/web        -> /usr/web/bar/one/two.html
    UserDir /home/*/www     -> /home/web/bar/one/two.html

The following directives will send redirects to the client:

    UserDir http://www.x.com/users   -> http//www.x.com/users/bar/one/two.html
    UserDir http://www.x.com/*/y     -> http://www.x.com/y/one/two.html