3770N/A<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
18N/A<
title>Apache module mod_imap</
title>
18N/A<!-- Background white, links blue (unvisited), navy (visited), red (active) --> 18N/A<
h1 ALIGN="CENTER">Module mod_imap</
h1>
18N/Acompiled in by default. It provides for <
code>.map</
code> files,
18N/Areplacing the functionality of the <
code>imagemap</
code> CGI
18N/Aprogram. Any directory or document type configured to use the handler
3770N/A<
code>imap-file</
code> (using either <
code><
A 18N/AThis module is in the default Apache distribution. The following directive will
18N/Aactivate files ending with <
code>.map</
code> as imagemap files:
18N/A<
blockquote><
code>AddHandler imap-file map</
code></
blockquote>
42N/ANote that the following is still supported:
135N/AHowever, we are trying to phase out "magic MIME types" so we are deprecating
136N/AThe imagemap module adds some new features that were not
136N/Apossible with previously distributed imagemap programs.<
P>
136N/A<
LI>URL references relative to the Referer: information.
136N/A<
LI>Default <BASE> assignment through a new map directive
3533N/A<
LI>Configurable generation of imagemap menus.
3533N/A<
h2>Configuration Directives</
h2>
3533N/A<
li><
A HREF="#imapmenu">ImapMenu</
A>
3533N/A<
li><
A HREF="#imapdefault">ImapDefault</
A>
3533N/A<
li><
A HREF="#imapbase">ImapBase</
A>
3533N/A<
h3><
A name="imapmenu">ImapMenu</
A></
h3>
3533N/A<
strong>Syntax:</
strong> ImapMenu <
code>{none, formatted, semi-formatted,
3533N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
3533N/A<
Strong>Override:</
strong> Indexes<
br>
3533N/A<
strong>Compatibility:</
strong> ImapMenu is only available in Apache
3533N/AThe ImapMenu directive determines the action taken if an imagemap file
3533N/Ais called without valid coordinates.
3533N/A <
code>none</
code>, no menu is generated, and the <
code>default</
code>
3533N/A <
dd>A <
code>formatted</
code> menu is the simplest menu. Comments
3533N/A in the imagemap file are ignored. A level one header is
136N/A printed, then an hrule, then the links each on a separate line.
135N/A The menu has a consistent, plain look close to that of
3533N/A <
dt><
code>semiformatted</
code>
3533N/A <
dd>In the <
code>semiformatted</
code> menu, comments are printed
3533N/A where they occur in the imagemap file. Blank lines are turned
3533N/A into HTML breaks. No header or hrule is printed, but otherwise
3533N/A the menu is the same as a <
code>formatted</
code> menu.
3533N/A <
dt><
code>unformatted</
code>
844N/A <
dd>Comments are printed, blank lines are ignored. Nothing is
844N/A printed that does not appear in the imagemap file. All breaks
844N/A and headers must be included as comments in the imagemap file.
844N/A This gives you the most flexibility over the appearance of your
18N/A menus, but requires you to treat your map files as HTML instead
137N/A<
h3><
A name="imapdefault">ImapDefault</
A></
h3>
137N/A<
strong>Syntax:</
strong> ImapDefault <
code>{error, nocontent,
137N/A map, referer, URL}</
code><
br>
137N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
137N/A<
Strong>Override:</
strong> Indexes<
br>
18N/A<
strong>Compatibility:</
strong> ImapDefault is only available in Apache
58N/AThe ImapDefault directive sets the default <
code>default</
code> used in
18N/Athe imagemap files. It's value is overridden by a <
code>default</
code>
135N/Adirective within the imagemap file. If not present, the
3533N/A<
code>default</
code> action is <
code>nocontent</
code>, which means
3533N/Athat a <
code>204 No Content</
code> is sent to the client. In this
3533N/Acase, the client should continue to display the original page.
136N/A<
h3><
A name="imapbase">ImapBase</
A></
h3>
135N/A<
strong>Syntax:</
strong> ImapBase <
code>{map, referer, URL}</
code><
br>
135N/A<
Strong>Context:</
strong> server config, virtual host, directory, .htaccess<
br>
135N/A<
Strong>Override:</
strong> Indexes<
br>
135N/A<
strong>Compatibility:</
strong> ImapBase is only available in Apache
3533N/AThe ImapBase directive sets the default <
code>base</
code> used in
135N/Athe imagemap files. It's value is overridden by a <
code>base</
code>
135N/Adirective within the imagemap file. If not present, the
135N/AThe lines in the imagemap files can have one of several formats:
137N/A<
code>directive value [x,y ...]</
code><
br>
135N/A<
code>directive value "Menu text" [x,y ...]</
code><
br>
135N/A<
code>directive value x,y ... "Menu text"</
code><
br>
844N/AThe directive is one of <
code>base</
code>, <
code>default</
code>,
135N/A<
code>poly</
code>, <
code>circle</
code>, <
code>rect</
code>, or
135N/A<
code>point</
code>. The value is an absolute or relative URL, or one
136N/Aof the special values listed below. The coordinates are
136N/A<
code>x,y</
code> pairs separated by whitespace. The quoted text is
135N/Aused as the text of the link if a imagemap menu is generated. Lines
135N/Abeginning with '#' are comments.
135N/A<
h3>Imagemap File Directives</
h3>
3533N/AThere are six directives allowed in the imagemap file. The directives
3533N/Acan come in any order, but are processed in the order they are found
3533N/A<
dt><
code>base</
code> Directive
3533N/A<
dd>Has the effect of <
code><BASE href="value"></
code>. The
18N/A non-absolute URLs of the map-file are taken relative to this value.
18N/A The <
code>base</
code> directive overrides ImapBase as set in a
42N/A .htaccess file or in the server configuration files. In the absence
42N/A of an ImapBase configuration directive, <
code>base</
code> defaults to
3533N/A <
code>base_uri</
code> is synonymous with <
code>base</
code>. Note that
3533N/A a trailing slash on the URL is significant.
18N/A<
dt><
code>default</
code> Directive
212N/A<
dd>The action taken if the coordinates given do not fit any of the
212N/A <
code>poly</
code>, <
code>circle</
code> or <
code>rect</
code>
3533N/A directives, and there are no <
code>point</
code> directives. Defaults
3533N/A to <
code>nocontent</
code> in the absence of an ImapDefault
212N/A configuration setting, causing a status code of <
code>204 No
212N/A Content</
code> to be returned. The client should keep the same
18N/A<
dt><
code>poly</
code> Directive
42N/A<
dd>Takes three to one-hundred points, and is obeyed if the user selected
18N/A coordinates fall within the polygon defined by these points.
3533N/A<
dd>Takes the center coordinates of a circle and a point on the circle. Is
42N/A obeyed if the user selected point is with the circle.
42N/A<
dt><
code>rect</
code> Directive
42N/A<
dd>Takes the coordinates of two opposing corners of a rectangle. Obeyed
42N/A if the point selected is within this rectangle.
42N/A<
dt><
code>point</
code> Directive
42N/A<
dd>Takes a single point. The point directive closest to the user
42N/A selected point is obeyed if no other directives are satisfied.
42N/A Note that <
code>default</
code> will not be followed if a
42N/A <
code>point</
code> directive is present and valid coordinates are
3533N/AThe values for each of the directives can any of the following:
3533N/A <
dd>The URL can be relative or absolute URL. Relative URLs can
3533N/A contain '..' syntax and will be resolved relative to the
18N/A <
code>base</
code> value. <
br>
18N/A <
code>base</
code> itself will not resolved according to the current
42N/A value. A statement <
code>base mailto:</
code> will work properly, though.
42N/A <
dt><
code>map</
code>
42N/A <
dd>Equivalent to the URL of the imagemap file itself. No
42N/A coordinates are sent with this, so a menu will be generated
42N/A unless ImapMenu is set to 'none'.
42N/A <
dt><
code>menu</
code>
42N/A <
dd>Synonymous with <
code>map</
code>.
42N/A <
dt><
code>referer</
code>
42N/A <
dd>Equivalent to the URL of the referring document.
42N/A header was present.
42N/A <
dt><
code>nocontent</
code>
42N/A <
dd>Sends a status code of <
code>204 No Content</
code>,
18N/A telling the client to keep the same page displayed. Valid for
18N/A all but <
code>base</
code>.
3533N/A <
dd>Fails with a <
code>500 Server Error</
code>. Valid for all but
3533N/A <
code>base</
code>, but sort of silly for anything but
3533N/A <
dt><
code>0,0 200,200</
code>
3533N/A <
dd>A coordinate consists of an <
tt>x</
tt> and a <
tt>y</
tt> value
3533N/A separated by a comma. The coordinates are separated from each other
3533N/A by whitespace. To accommodate the way Lynx handles imagemaps, should a
3533N/A user select the coordinate <
code>0,0</
code>, it is as if
3533N/A no coordinate had been selected.
3533N/A <
dt><
code>"Menu Text"</
code>
3533N/A <
dd>After the value or after the coordinates, the line optionally may
3533N/A contain text within double quotes. This string is used as the
3533N/A text for the link if a menu is generated:<
br>
3533N/A If no quoted text is present, the name of the link will be used
3533N/A It is impossible to escape double quotes within this text.
3533N/A#Comments are printed in a 'formatted' or 'semiformatted' menu. <
br>
3533N/A#And can contain html tags. <hr> <
br>
3533N/Apoly map "Could I have a menu, please?" 0,0 0,10 10,10 10,0 <
br>
3533N/Arect .. 0,0 77,27 "the directory of the referer"<
br>
3533N/Arect another_file "in same directory as referer" 306,0 419,27 <
br>
18N/Arect mailto:nate@tripod.com 100,150 200,0 "Bugs?" <
br>
18N/A<
h2>Referencing your mapfile</
h2>
18N/A</
code></
blockquote><
p>