From c5f5f84f58fb48d025a1d0a4769ffc63bef5c115 Mon Sep 17 00:00:00 2001 From: pcs Date: Fri, 20 Nov 1998 15:56:34 +0000 Subject: [PATCH] Add link to description of how files with multiple extensions are handled. At the same time update the descriptions of the directives to make the descriptions in the authoritative file (mod/mod_mime.html). PR: 3151 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@82405 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/handler.html | 64 +++++++++++++++++++++++++------------ docs/manual/handler.html.en | 64 +++++++++++++++++++++++++------------ 2 files changed, 88 insertions(+), 40 deletions(-) diff --git a/docs/manual/handler.html b/docs/manual/handler.html index 7012a72745..a706ec9eb4 100644 --- a/docs/manual/handler.html +++ b/docs/manual/handler.html @@ -28,7 +28,10 @@ separately. For example, you may use a type of explicitly. Either based on filename extensions or on location, these handlers are unrelated to file type. This is advantageous both because it is a more elegant solution, but it also allows for both a type -and a handler to be associated with a file.

+and a handler to be associated with a file (See also +Files with Multiple Extensions) + +

Handlers can either be built into the server or to a module, or they can be added with the Syntax: <AddHandler handler-name - extension>
+>Syntax: AddHandler handler-name extension extension...
Context: server config, virtual host, directory, - .htaccess
+>Context: server config, virtual host, directory, .htaccess
+Override: FileInfo
Module: mod_mime +>Module: mod_mime
+Compatibility: AddHandler is only available in Apache +1.1 and later

+ +

AddHandler maps the filename extensions extension to the +handler handler-name. This mapping is added to any already +in force, overriding any mappings that already exist for the same +extension. -

AddHandler maps the filename extension extension to the -handler handler-name. For example, to activate CGI scripts +For example, to activate CGI scripts with the file extension ".cgi", you might use:

     AddHandler cgi-script cgi
 

Once that has been put into your srm.conf or httpd.conf file, any -file ending with ".cgi" will be treated as a CGI -program.

+file containing the ".cgi" extension will be treated as a +CGI program.

+ +

+ +See also: Files with +multiple extensions


@@ -112,7 +131,7 @@ program.

Syntax: <SetHandler handler-name>
+>Syntax: SetHandler handler-name
Module: mod_mime +>Module: mod_mime
+Compatibility: SetHandler is only available in Apache +1.1 and later.

When placed into an .htaccess file or a -<Directory> or <Location> section, -this directive forces all matching files to be parsed through the -handler given by handler-name. For example, if you had a +<Directory> or <Location> +section, this directive forces all matching files to be parsed through +the handler given by handler-name. For example, if you had a directory you wanted to be parsed entirely as imagemap rule files, regardless of extension, you might put the following into an -.htaccess file in that directory: +.htaccess file in that directory:

     SetHandler imap-file
 
+

Another example: if you wanted to have the server display a status -report whenever a URL of http://servername/server-status was +report whenever a URL of http://servername/status was called, you might put the following into access.conf:

-    <Location /server-status>
+    <Location /status>
     SetHandler server-status
     </Location>
 
- -


+

Programmer's Note

diff --git a/docs/manual/handler.html.en b/docs/manual/handler.html.en index 7012a72745..a706ec9eb4 100644 --- a/docs/manual/handler.html.en +++ b/docs/manual/handler.html.en @@ -28,7 +28,10 @@ separately. For example, you may use a type of explicitly. Either based on filename extensions or on location, these handlers are unrelated to file type. This is advantageous both because it is a more elegant solution, but it also allows for both a type -and a handler to be associated with a file.

+and a handler to be associated with a file (See also +Files with Multiple Extensions) + +

Handlers can either be built into the server or to a module, or they can be added with the Syntax: <AddHandler handler-name - extension>
+>Syntax: AddHandler handler-name extension extension...
Context: server config, virtual host, directory, - .htaccess
+>Context: server config, virtual host, directory, .htaccess
+Override: FileInfo
Module: mod_mime +>Module: mod_mime
+Compatibility: AddHandler is only available in Apache +1.1 and later

+ +

AddHandler maps the filename extensions extension to the +handler handler-name. This mapping is added to any already +in force, overriding any mappings that already exist for the same +extension. -

AddHandler maps the filename extension extension to the -handler handler-name. For example, to activate CGI scripts +For example, to activate CGI scripts with the file extension ".cgi", you might use:

     AddHandler cgi-script cgi
 

Once that has been put into your srm.conf or httpd.conf file, any -file ending with ".cgi" will be treated as a CGI -program.

+file containing the ".cgi" extension will be treated as a +CGI program.

+ +

+ +See also: Files with +multiple extensions


@@ -112,7 +131,7 @@ program.

Syntax: <SetHandler handler-name>
+>Syntax: SetHandler handler-name
Module: mod_mime +>Module: mod_mime
+Compatibility: SetHandler is only available in Apache +1.1 and later.

When placed into an .htaccess file or a -<Directory> or <Location> section, -this directive forces all matching files to be parsed through the -handler given by handler-name. For example, if you had a +<Directory> or <Location> +section, this directive forces all matching files to be parsed through +the handler given by handler-name. For example, if you had a directory you wanted to be parsed entirely as imagemap rule files, regardless of extension, you might put the following into an -.htaccess file in that directory: +.htaccess file in that directory:

     SetHandler imap-file
 
+

Another example: if you wanted to have the server display a status -report whenever a URL of http://servername/server-status was +report whenever a URL of http://servername/status was called, you might put the following into access.conf:

-    <Location /server-status>
+    <Location /status>
     SetHandler server-status
     </Location>
 
- -


+

Programmer's Note

-- 2.40.0