blob: 790c752efaa3c39eda0ca0d8fa4aa1b5c4dec7ab [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Apache module mod_userdir</TITLE>
</HEAD>
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#000080"
ALINK="#FF0000"
>
<!--#include virtual="header.html" -->
<H1 ALIGN="CENTER">Module mod_userdir</h1>
This module is contained in the <code>mod_userdir.c</code> file, and
is compiled in by default. It provides for user-specific directories.
<ul>
<li><A HREF="#userdir">UserDir</A>
</ul>
<hr>
<h2><A name="userdir">UserDir</A></h2>
<!--%plaintext &lt;?INDEX {\tt UserDir} directive&gt; -->
<strong>Syntax:</strong> UserDir <em>directory/filename</em><br>
<strong>Default:</strong> <code>UserDir public_html</code><br>
<Strong>Context:</strong> server config, virtual host<br>
<strong>Status:</strong> Base<br>
<strong>Module:</strong> mod_userdir<br>
<strong>Compatibility:</strong> All forms except the <code>UserDir
public_html</code> form are only available in Apache 1.1 or above.<p>
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.
<em>Directory</em> is either <code>disabled</code>, to disable this feature,
or the name of a directory, following one of the following
patterns. If not disabled, then a request for
<code>http://www.foo.com/~bob/one/two.html</code> will be translated to:
<pre>
UserDir public_html -&gt; ~bob/public_html/one/two.html
UserDir /usr/web -&gt; /usr/web/bob/one/two.html
UserDir /home/*/www -&gt; /home/bob/www/one/two.html
</pre>
The following directives will send redirects to the client:
<pre>
UserDir http://www.foo.com/users -&gt; http//www.foo.com/users/bob/one/two.html
UserDir http://www.foo.com/*/usr -&gt; http://www.foo.com/bob/usr/one/two.html
UserDir http://www.foo.com/~*/ -&gt; http://www.foo.com/~bob/one/two.html
</pre>
<P>
<STRONG>
Be careful when using this directive; for instance, <SAMP>&quot;UserDir
./&quot;</SAMP> would map <SAMP>&quot;/~root&quot;</SAMP> to
<SAMP>&quot;/&quot;</SAMP> - which is probably undesirable. See also
the
<A
HREF="core.html#directory"
>&lt;Directory&gt;</A>
directive and the
<A
HREF="../misc/security_tips.html"
>Security Tips</A>
page for more information.
</STRONG>
</P>
<!--#include virtual="footer.html" -->
</BODY>
</HTML>