httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r795450 - in /httpd/httpd/trunk: docs/manual/mod/mod_dir.xml modules/mappers/mod_dir.c
Date Sat, 18 Jul 2009 23:49:21 GMT
Author: niq
Date: Sat Jul 18 23:49:20 2009
New Revision: 795450

URL: http://svn.apache.org/viewvc?rev=795450&view=rev
Log:
mod_dir: Change DefaultHandler to DefaultMapping, and document it

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_dir.xml
    httpd/httpd/trunk/modules/mappers/mod_dir.c

Modified: httpd/httpd/trunk/docs/manual/mod/mod_dir.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_dir.xml?rev=795450&r1=795449&r2=795450&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_dir.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_dir.xml Sat Jul 18 23:49:20 2009
@@ -156,5 +156,25 @@
     </note>
 </usage>
 </directivesynopsis>
+<directivesynopsis>
+<name>DefaultMapping</name>
+<description>Define a default URL for requests that don't map to a file</description>
+<syntax>DefaultMapping <var>local-url</var></syntax>
+<default>None - httpd will return 404 (Not Found)</default>
+<contextlist><context>server config</context><context>virtual host</context>
+<context>directory</context><context>.htaccess</context></contextlist>
+<override>Indexes</override>
+<usage>
+    <p>Use this to set a handler for any URL that doesn't map to anything
+    in your filesystem, and would otherwise return HTTP 404 (Not Found).
+    For example</p>
+    <example>
+        <code>DefaultMapping default.php</code>
+    </example>
+    <p>will cause requests for non-existent files to be handled by
+    <code>default.php</code>, while requests for files that exist
+    are unaffected.</p>
+</usage>
+</directivesynopsis>
 
 </modulesynopsis>

Modified: httpd/httpd/trunk/modules/mappers/mod_dir.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_dir.c?rev=795450&r1=795449&r2=795450&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_dir.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_dir.c Sat Jul 18 23:49:20 2009
@@ -83,7 +83,7 @@
 
 static const command_rec dir_cmds[] =
 {
-    AP_INIT_TAKE1("DefaultHandler", ap_set_string_slot,
+    AP_INIT_TAKE1("DefaultMapping", ap_set_string_slot,
                   (void*)APR_OFFSETOF(dir_config_rec, dflt),
                   DIR_CMD_PERMS, "Set a default handler"),
     AP_INIT_RAW_ARGS("DirectoryIndex", add_index, NULL, DIR_CMD_PERMS,



Mime
View raw message