From: Nick Kew Date: Sat, 18 Jul 2009 23:49:20 +0000 (+0000) Subject: mod_dir: Change DefaultHandler to DefaultMapping, and document it X-Git-Tag: 2.3.3~426 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99dfebc75208c3168cdc7224db906e77f0dca141;p=apache mod_dir: Change DefaultHandler to DefaultMapping, and document it git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@795450 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_dir.xml b/docs/manual/mod/mod_dir.xml index 3e43020bd0..5ed2888ff3 100644 --- a/docs/manual/mod/mod_dir.xml +++ b/docs/manual/mod/mod_dir.xml @@ -156,5 +156,25 @@ a directory + +DefaultMapping +Define a default URL for requests that don't map to a file +DefaultMapping local-url +None - httpd will return 404 (Not Found) +server configvirtual host +directory.htaccess +Indexes + +

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

+ + DefaultMapping default.php + +

will cause requests for non-existent files to be handled by + default.php, while requests for files that exist + are unaffected.

+
+
diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c index 95071c956b..527842e078 100644 --- a/modules/mappers/mod_dir.c +++ b/modules/mappers/mod_dir.c @@ -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,