mod_imap.html revision d030d579df50673f566f5dbcd1904fd59cd310e0
5f5870385cff47efd2f58e7892f251cf13761528Timo Sirainen<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen BGCOLOR="#FFFFFF"
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen TEXT="#000000"
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen LINK="#0000FF"
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen VLINK="#000080"
d477acb83e14a776ece4ca94dcd1869e75d0c6eeTimo Sirainen ALINK="#FF0000"
9dd1c256910f1fb42823116a641e7edb3ad11970Timo Sirainen<!--#include virtual="header.html" -->
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo SirainenThis module is contained in the <CODE>mod_imap.c</CODE> file, and is
daa7e7459749ae8f82cd3eed9c44522d81c609a3Timo Sirainencompiled in by default. It provides for <CODE>.map</CODE> files,
46ec5983bf4519ea42dbfcae3d7c62be0d8ef95fTimo Sirainenreplacing the functionality of the <CODE>imagemap</CODE> CGI
bbadd5331f534017cf62d5183003b3d9fdad079eTimo Sirainenprogram. Any directory or document type configured to use the handler
72f5f2c5c6905b5d3f389b424313e2c450dfad96Timo SirainenHREF="mod_mime.html#addhandler">AddHandler</A> </CODE> or <CODE><A
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo SirainenHREF="mod_mime.html#sethandler">SetHandler</A></CODE>) will be
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainenprocessed by this module.
373492be949e159fda651807b3acda2c5c077027Timo SirainenThis module is in the default Apache distribution. The following directive will
bbadd5331f534017cf62d5183003b3d9fdad079eTimo Sirainenactivate files ending with <CODE>.map</CODE> as imagemap files:
ab90f702ceedb7ba445a9a592be0b213b27cbafaStephan Bosch<BLOCKQUOTE><CODE>AddHandler imap-file map</CODE></BLOCKQUOTE>
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo SirainenNote that the following is still supported:
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainen <BLOCKQUOTE><CODE>AddType application/x-httpd-imap map</CODE></BLOCKQUOTE>
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo SirainenHowever, we are trying to phase out "magic MIME types" so we are deprecating
7bafda1813454621e03615e83d55bccfa7cc56bdTimo SirainenThe imagemap module adds some new features that were not
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainenpossible with previously distributed imagemap programs.<P>
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen<LI>URL references relative to the Referer: information.
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen<LI>Default <BASE> assignment through a new map directive
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen<LI>No need for <CODE>imagemap.conf</CODE> file.
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen<LI>Point references.
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen<LI>Configurable generation of imagemap menus.
635df5b4cbcd7b24c825e01d9dd66d3a4274c4c7Timo Sirainen><STRONG>Syntax:</STRONG></A> ImapMenu <CODE>{none, formatted, semi-formatted,
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainen><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR>
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen HREF="directive-dict.html#Compatibility"
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen><STRONG>Compatibility:</STRONG></A> ImapMenu is only available in Apache
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen1.1 and later.<P>
7bafda1813454621e03615e83d55bccfa7cc56bdTimo SirainenThe ImapMenu directive determines the action taken if an imagemap file
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainenis called without valid coordinates.
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen <DD>If ImapMenu is
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen <CODE>none</CODE>, no menu is generated, and the <CODE>default</CODE>
ba8498efbf886ca8b69fdb20c0ba2f5dba9416e3Timo Sirainen action is performed.
f7f25f9e1a38678d0e97d2e609beac16285fac6bTimo Sirainen <DD>A <CODE>formatted</CODE> menu is the simplest menu. Comments
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen in the imagemap file are ignored. A level one header is
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen printed, then an hrule, then the links each on a separate line.
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen The menu has a consistent, plain look close to that of
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen a directory listing.
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainen <DD>In the <CODE>semiformatted</CODE> menu, comments are printed
9f0f2de10e4ea0c99052bf4b2bef8179f2536228Timo Sirainen where they occur in the imagemap file. Blank lines are turned
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen into HTML breaks. No header or hrule is printed, but otherwise
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen the menu is the same as a <CODE>formatted</CODE> menu.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen <DD>Comments are printed, blank lines are ignored. Nothing is
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainen printed that does not appear in the imagemap file. All breaks
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen and headers must be included as comments in the imagemap file.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen This gives you the most flexibility over the appearance of your
04052d7cacaa866a3f00afb4e104fa46c04c1dd7Timo Sirainen menus, but requires you to treat your map files as HTML instead
04052d7cacaa866a3f00afb4e104fa46c04c1dd7Timo Sirainen of plaintext.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen><STRONG>Syntax:</STRONG></A> ImapDefault <CODE>{error, nocontent,
3cf67672fdc87583cb23ce088c95bb5dee60e74dTimo Sirainen><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR>
3cf67672fdc87583cb23ce088c95bb5dee60e74dTimo Sirainen HREF="directive-dict.html#Compatibility"
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainen><STRONG>Compatibility:</STRONG></A> ImapDefault is only available in Apache
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen1.1 and later.<P>
9dd1c256910f1fb42823116a641e7edb3ad11970Timo SirainenThe ImapDefault directive sets the default <CODE>default</CODE> used in
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainenthe imagemap files. It's value is overridden by a <CODE>default</CODE>
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainendirective within the imagemap file. If not present, the
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen<CODE>default</CODE> action is <CODE>nocontent</CODE>, which means
9dd1c256910f1fb42823116a641e7edb3ad11970Timo Sirainenthat a <CODE>204 No Content</CODE> is sent to the client. In this
9dd1c256910f1fb42823116a641e7edb3ad11970Timo Sirainencase, the client should continue to display the original page.
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainen><STRONG>Syntax:</STRONG></A> ImapBase <CODE>{map, referer, URL}</CODE><BR>
04052d7cacaa866a3f00afb4e104fa46c04c1dd7Timo Sirainen><STRONG>Context:</STRONG></A> server config, virtual host, directory, .htaccess<BR>
3cf67672fdc87583cb23ce088c95bb5dee60e74dTimo Sirainen HREF="directive-dict.html#Compatibility"
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainen><STRONG>Compatibility:</STRONG></A> ImapBase is only available in Apache
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen1.1 and later.<P>
a64adf62fa33f2463a86f990217b0c9078531a40Timo SirainenThe ImapBase directive sets the default <CODE>base</CODE> used in
9dd1c256910f1fb42823116a641e7edb3ad11970Timo Sirainenthe imagemap files. It's value is overridden by a <CODE>base</CODE>
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainendirective within the imagemap file. If not present, the
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen<CODE>base</CODE> defaults to <CODE>http://servername/</CODE>.
a64adf62fa33f2463a86f990217b0c9078531a40Timo SirainenThe lines in the imagemap files can have one of several formats:
401b0787fff2dc986a5321ddb32acb1947ff66b0Timo Sirainen<CODE>directive value "Menu text" [x,y ...]</CODE><BR>
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen<CODE>directive value x,y ... "Menu text"</CODE><BR>
57d2429fae575e96ca276355af675deb66b76d00Timo SirainenThe directive is one of <CODE>base</CODE>, <CODE>default</CODE>,
401b0787fff2dc986a5321ddb32acb1947ff66b0Timo Sirainen<CODE>poly</CODE>, <CODE>circle</CODE>, <CODE>rect</CODE>, or
401b0787fff2dc986a5321ddb32acb1947ff66b0Timo Sirainen<CODE>point</CODE>. The value is an absolute or relative URL, or one
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainenof the special values listed below. The coordinates are
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen<CODE>x,y</CODE> pairs separated by whitespace. The quoted text is
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainenused as the text of the link if a imagemap menu is generated. Lines
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainenbeginning with '#' are comments.
a64adf62fa33f2463a86f990217b0c9078531a40Timo SirainenThere are six directives allowed in the imagemap file. The directives
61618d4c58080570f689614fec204ae14e90cef2Timo Sirainencan come in any order, but are processed in the order they are found
50e20db49f29917fe9adcf1b56b11badf28bd0e4Timo Sirainenin the imagemap file.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen<DD>Has the effect of <CODE><BASE HREF="value"></CODE>. The
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen non-absolute URLs of the map-file are taken relative to this value.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen The <CODE>base</CODE> directive overrides ImapBase as set in a
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen .htaccess file or in the server configuration files. In the absence
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen of an ImapBase configuration directive, <CODE>base</CODE> defaults to
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen <CODE>base_uri</CODE> is synonymous with <CODE>base</CODE>. Note that
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainen a trailing slash on the URL is significant.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen<DD>The action taken if the coordinates given do not fit any of the
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen <CODE>poly</CODE>, <CODE>circle</CODE> or <CODE>rect</CODE>
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen directives, and there are no <CODE>point</CODE> directives. Defaults
c6f894e1522f7b0b6068c228900914073c145175Timo Sirainen to <CODE>nocontent</CODE> in the absence of an ImapDefault
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen configuration setting, causing a status code of <CODE>204 No
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen Content</CODE> to be returned. The client should keep the same
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen page displayed.
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen<DD>Takes three to one-hundred points, and is obeyed if the user selected
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen coordinates fall within the polygon defined by these points.
1da01eaa962be13cee75771064e2256b1a82d90aTimo Sirainen<DD>Takes the center coordinates of a circle and a point on the circle. Is
401b0787fff2dc986a5321ddb32acb1947ff66b0Timo Sirainen obeyed if the user selected point is with the circle.
401b0787fff2dc986a5321ddb32acb1947ff66b0Timo Sirainen<DD>Takes the coordinates of two opposing corners of a rectangle. Obeyed
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen if the point selected is within this rectangle.
7744586e3e0fd60158abfbb03a233d3bd8d6c48bTimo Sirainen<DD>Takes a single point. The point directive closest to the user
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen selected point is obeyed if no other directives are satisfied.
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen Note that <CODE>default</CODE> will not be followed if a
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen <CODE>point</CODE> directive is present and valid coordinates are
7bafda1813454621e03615e83d55bccfa7cc56bdTimo SirainenThe values for each of the directives can any of the following:
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen <DD>The URL can be relative or absolute URL. Relative URLs can
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen contain '..' syntax and will be resolved relative to the
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen <CODE>base</CODE> itself will not resolved according to the current
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen value. A statement <CODE>base mailto:</CODE> will work properly, though.
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen <DD>Equivalent to the URL of the imagemap file itself. No
c6f894e1522f7b0b6068c228900914073c145175Timo Sirainen coordinates are sent with this, so a menu will be generated
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen unless ImapMenu is set to 'none'.
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen <DD>Equivalent to the URL of the referring document.
401b0787fff2dc986a5321ddb32acb1947ff66b0Timo Sirainen Defaults to <CODE>http://servername/</CODE> if no Referer:
401b0787fff2dc986a5321ddb32acb1947ff66b0Timo Sirainen header was present.
f01eb1f51d618633c0189be9ab60a774f47fb7dfTimo Sirainen <DD>Sends a status code of <CODE>204 No Content</CODE>,
f01eb1f51d618633c0189be9ab60a774f47fb7dfTimo Sirainen telling the client to keep the same page displayed. Valid for
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen <DD>Fails with a <CODE>500 Server Error</CODE>. Valid for all but
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen <CODE>base</CODE>, but sort of silly for anything but
383d0e8c24451468d6bea17e4b55d74de744abe6Timo Sirainen <DD>A coordinate consists of an <TT>x</TT> and a <TT>y</TT> value
7bafda1813454621e03615e83d55bccfa7cc56bdTimo Sirainen separated by a comma. The coordinates are separated from each other
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen by whitespace. To accommodate the way Lynx handles imagemaps, should a
a64adf62fa33f2463a86f990217b0c9078531a40Timo Sirainen user select the coordinate <CODE>0,0</CODE>, it is as if
d477acb83e14a776ece4ca94dcd1869e75d0c6eeTimo Sirainen no coordinate had been selected.
4ee00532a265bdfb38539d811fcd12d51210ac35Timo Sirainen <DD>After the value or after the coordinates, the line optionally may
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainen contain text within double quotes. This string is used as the
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainen text for the link if a menu is generated:<BR>
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainen <CODE><a HREF="http://foo.com/">Menu text</a></CODE><BR>
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainen If no quoted text is present, the name of the link will be used
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainen as the text:<BR>
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainen <CODE><a HREF="http://foo.com/">http://foo.com</a></CODE><BR>
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainen It is impossible to escape double quotes within this text.
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainen#Comments are printed in a 'formatted' or 'semiformatted' menu. <BR>
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainen#And can contain html tags. <hr> <BR>
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainenbase referer <BR>
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainenpoly map "Could I have a menu, please?" 0,0 0,10 10,10 10,0 <BR>
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainenrect .. 0,0 77,27 "the directory of the referer"<BR>
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainencircle http://www.inetnebr.com/lincoln/feedback/ 195,0 305,27 <BR>
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainenrect another_file "in same directory as referer" 306,0 419,27 <BR>
738cfeb96c4b9cd92aa3c791d77734c2745cdd1aTimo Sirainenrect mailto:nate@tripod.com 100,150 200,0 "Bugs?" <BR>
7289c5600711b45f30fe289ab5b0293b51d87041Timo Sirainen<IMG ISMAP SRC="/images/imagemap1.gif"> <BR>
15f526e5ac611b4532568d131fcd0abf664abe41Timo Sirainen<!--#include virtual="footer.html" -->