A tilde can sneak into a rule via a backreference and cause some surprising behavior
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@577254
13f79535-47bb-0310-9956-
ffa450edef68
</dd>
</dl>
+<div class="note"><h3>Home directory expansion</h3>
+<p> When the substitution string begins with a string
+resembling "/~user" (via explicit text or backreferences), mod_rewrite performs
+home directory expansion independent of the presence or configuration
+of <code class="module"><a href="../mod/mod_userdir.html">mod_userdir</a></code></p>
+
+<p> This expansion does not occur when the <em>PT</em>
+flag is used on the <code class="directive"><a href="#rewriterule">RewriteRule</a></code>
+directive.</p>
+</div>
+
<div class="note"><h3>Per-directory Rewrites</h3>
<p>The rewrite engine may be used in <a href="../howto/htaccess.html">.htaccess</a> files. To enable the
</dd>
</dl>
+<note><title>Home directory expansion</title>
+<p> When the substitution string begins with a string
+resembling "/~user" (via explicit text or backreferences), mod_rewrite performs
+home directory expansion independent of the presence or configuration
+of <module>mod_userdir</module></p>
+
+<p> This expansion does not occur when the <em>PT</em>
+flag is used on the <directive module="mod_rewrite">RewriteRule</directive>
+directive.</p>
+</note>
+
<note><title>Per-directory Rewrites</title>
<p>The rewrite engine may be used in <a