]> granicus.if.org Git - apache/commitdiff
Allow the UserDir directive to accept a list of directories.
authorRyan Bloom <rbb@apache.org>
Sat, 28 Sep 2002 06:10:47 +0000 (06:10 +0000)
committerRyan Bloom <rbb@apache.org>
Sat, 28 Sep 2002 06:10:47 +0000 (06:10 +0000)
This matches what Apache 1.3 does.  Also add documentation for
this feature.

PR: 9299
Submitted by: Jay Ball <jay@veggiespam.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97001 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
docs/manual/mod/mod_userdir.html.en
docs/manual/mod/mod_userdir.xml
modules/mappers/mod_userdir.c
modules/ssl/ssl_expr_parse.h

diff --git a/CHANGES b/CHANGES
index 46fdff9d8d50623c6aa128674d4d8774a5bf9977..d4afb23b782887429ec07dfe25d16a97b3c291e3 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 Changes with Apache 2.0.43
 
+  *) Allow the UserDir directive to accept a list of directories.
+     This matches what Apache 1.3 does.  Also add documentation for
+     this feature. [Jay Ball <jay@veggiespam.com>]
+
   *) New Module: mod_logio. adds the ability to log bytes sent and
      received. [Bojan Smojver <bojan@rexursive.com>]
 
index 941ce505424f8c511409207bade9c8e82338bd04..305a421e87951c49914c86fbb998f5a41a2561f0 100644 (file)
@@ -104,5 +104,19 @@ UserDir enabled<br />
 UserDir disabled user4 user5 user6
 </code></p></div>
 
+<p>It is also possible to specify alternative user directories.
+If you use a command like:</p>
+<div class="example"><p><code>
+Userdir public_html /usr/web http://www.foo.com/
+</code></p></div>
+<p>With a request for http://www.foo.com/~bob/one/two.html, will try to 
+find the page at ~bob/public_html/one/two.html first, then
+/usr/web/bob/one/two.html, and finally it will send a redirect
+to http://www.foo.com/bob/one/two.html.</p>
+<p>If you add a redirect, it must be the last alternative in the list.
+Apache cannot determine if the redirect succeeded or not, so if you have
+the redirect earlier in the list, that will always be the alternative
+that is used.</p>
+
 <h3>See also</h3><ul><li><a href="../howto/public_html.html">public_html
 tutorial</a></li></ul></div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p><p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div></body></html>
\ No newline at end of file
index ec0b519b3a81afed1bc500be7752aba26e24c8ff..16daf9b5fd739df4196c7c2448f22c33a9dea868 100755 (executable)
@@ -114,6 +114,20 @@ UserDir enabled<br />
 UserDir disabled user4 user5 user6
 </example>
 
+<p>It is also possible to specify alternative user directories.
+If you use a command like:</p>
+<example>
+Userdir public_html /usr/web http://www.foo.com/
+</example>
+<p>With a request for http://www.foo.com/~bob/one/two.html, will try to 
+find the page at ~bob/public_html/one/two.html first, then
+/usr/web/bob/one/two.html, and finally it will send a redirect
+to http://www.foo.com/bob/one/two.html.</p>
+<p>If you add a redirect, it must be the last alternative in the list.
+Apache cannot determine if the redirect succeeded or not, so if you have
+the redirect earlier in the list, that will always be the alternative
+that is used.</p>
+
 </usage>
 
 <seealso><a href="../howto/public_html.html">public_html
index e76b2fe1dd255496ed449fed65a093b2d6244ca6..2d0a271ae2a68ceb5892993dea842e1525d2e6ae 100644 (file)
@@ -328,9 +328,6 @@ static int translate_userdir(request_rec *r)
             if (apr_get_home_directory(&homedir, w, r->pool) == APR_SUCCESS) {
                 filename = apr_pstrcat(r->pool, homedir, "/", userdir, NULL);
             }
-            else {
-                return DECLINED;
-            }
 #else
             return DECLINED;
 #endif
index 5378e2874c5271d4c23c0fe9e8d909b784591b54..64413c2b3247ad63d44826102e278f4cbbd6dbb4 100644 (file)
@@ -1,27 +1,25 @@
+#define T_TRUE 257
+#define T_FALSE 258
+#define T_DIGIT 259
+#define T_ID 260
+#define T_STRING 261
+#define T_REGEX 262
+#define T_REGEX_I 263
+#define T_FUNC_FILE 264
+#define T_OP_EQ 265
+#define T_OP_NE 266
+#define T_OP_LT 267
+#define T_OP_LE 268
+#define T_OP_GT 269
+#define T_OP_GE 270
+#define T_OP_REG 271
+#define T_OP_NRE 272
+#define T_OP_IN 273
+#define T_OP_OR 274
+#define T_OP_AND 275
+#define T_OP_NOT 276
 typedef union {
     char     *cpVal;
     ssl_expr *exVal;
 } YYSTYPE;
-#define        T_TRUE  257
-#define        T_FALSE 258
-#define        T_DIGIT 259
-#define        T_ID    260
-#define        T_STRING        261
-#define        T_REGEX 262
-#define        T_REGEX_I       263
-#define        T_FUNC_FILE     264
-#define        T_OP_EQ 265
-#define        T_OP_NE 266
-#define        T_OP_LT 267
-#define        T_OP_LE 268
-#define        T_OP_GT 269
-#define        T_OP_GE 270
-#define        T_OP_REG        271
-#define        T_OP_NRE        272
-#define        T_OP_IN 273
-#define        T_OP_OR 274
-#define        T_OP_AND        275
-#define        T_OP_NOT        276
-
-
 extern YYSTYPE ssl_expr_yylval;