]> granicus.if.org Git - apache/commitdiff
mod_dir: Change DefaultHandler to DefaultMapping, and document it
authorNick Kew <niq@apache.org>
Sat, 18 Jul 2009 23:49:20 +0000 (23:49 +0000)
committerNick Kew <niq@apache.org>
Sat, 18 Jul 2009 23:49:20 +0000 (23:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@795450 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_dir.xml
modules/mappers/mod_dir.c

index 3e43020bd0f63e106bf2ec730fdc3b10ced33190..5ed2888ff3afd77deecba9a54e5f3f3b4b7fca3e 100644 (file)
@@ -156,5 +156,25 @@ a directory</description>
     </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>
index 95071c956b16b69130f3ea05982f91ee41628a94..527842e078a1ad8326c6316823db2767169517e8 100644 (file)
@@ -83,7 +83,7 @@ static const char *configure_slash(cmd_parms *cmd, void *d_, int arg)
 
 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,