home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 May / Gamestar_62_2004-05_dvd.iso / Programy / apache_2.0.48-win32-x86-no_ssl.msi / Data.Cab / F252530_mod_imap.html.en < prev    next >
Extensible Markup Language  |  2003-05-29  |  19KB  |  380 lines

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
  4.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  5.               This file is generated from xml source: DO NOT EDIT
  6.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  7.       -->
  8. <title>mod_imap - Apache HTTP Server</title>
  9. <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
  10. <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
  11. <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
  12. <link href="../images/favicon.ico" rel="shortcut icon" /></head>
  13. <body>
  14. <div id="page-header">
  15. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
  16. <p class="apache">Apache HTTP Server Version 2.0</p>
  17. <img alt="" src="../images/feather.gif" /></div>
  18. <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
  19. <div id="path">
  20. <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs-project/">Documentation</a> > <a href="../">Version 2.0</a> > <a href="./">Modules</a></div>
  21. <div id="page-content">
  22. <div id="preamble"><h1>Apache Module mod_imap</h1>
  23. <div class="toplang">
  24. <p><span>Available Languages: </span><a href="../en/mod/mod_imap.html" title="English"> en </a></p>
  25. </div>
  26. <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Server-side imagemap processing</td></tr>
  27. <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
  28. <tr><th><a href="module-dict.html#ModuleIdentifier">ModuleáIdentifier:</a></th><td>imap_module</td></tr>
  29. <tr><th><a href="module-dict.html#SourceFile">SourceáFile:</a></th><td>mod_imap.c</td></tr></table>
  30. <h3>Summary</h3>
  31.  
  32.     <p>This module processes <code>.map</code> files, thereby
  33.     replacing the functionality of the <code>imagemap</code> CGI
  34.     program. Any directory or document type configured to use the
  35.     handler <code>imap-file</code> (using either 
  36.     <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code> or
  37.     <code class="directive"><a href="../mod/core.html#sethandler">SetHandler</a></code>)
  38.     will be processed by this module.</p>
  39.  
  40.     <p>The following directive will activate files ending with
  41.     <code>.map</code> as imagemap files:</p>
  42.  
  43.     <div class="example"><p><code>AddHandler imap-file map</code></p></div>
  44.  
  45.     <p>Note that the following is still supported:</p>
  46.  
  47.     <div class="example"><p><code>AddType application/x-httpd-imap map</code></p></div>
  48.  
  49.     <p>However, we are trying to phase out "magic MIME types" so we
  50.     are deprecating this method.</p>
  51. </div>
  52. <div id="quickview"><h3 class="directives">Directives</h3>
  53. <ul id="toc">
  54. <li><img alt="" src="../images/down.gif" /> <a href="#imapbase">ImapBase</a></li>
  55. <li><img alt="" src="../images/down.gif" /> <a href="#imapdefault">ImapDefault</a></li>
  56. <li><img alt="" src="../images/down.gif" /> <a href="#imapmenu">ImapMenu</a></li>
  57. </ul>
  58. <h3>Topics</h3>
  59. <ul id="topics">
  60. <li><img alt="" src="../images/down.gif" /> <a href="#features">New Features</a></li>
  61. <li><img alt="" src="../images/down.gif" /> <a href="#imapfile">Imagemap File</a></li>
  62. <li><img alt="" src="../images/down.gif" /> <a href="#example">Example Mapfile</a></li>
  63. <li><img alt="" src="../images/down.gif" /> <a href="#referencing">Referencing your mapfile</a></li>
  64. </ul></div>
  65. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  66. <div class="section">
  67. <h2><a name="features" id="features">New Features</a></h2>
  68.  
  69.     <p>The imagemap module adds some new features that were not
  70.     possible with previously distributed imagemap programs.</p>
  71.  
  72.     <ul>
  73.       <li>URL references relative to the Referer: information.</li>
  74.  
  75.       <li>Default <code><base></code> assignment through a new map
  76.       directive <code>base</code>.</li>
  77.  
  78.       <li>No need for <code>imagemap.conf</code> file.</li>
  79.  
  80.       <li>Point references.</li>
  81.  
  82.       <li>Configurable generation of imagemap menus.</li>
  83.     </ul>
  84. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  85. <div class="section">
  86. <h2><a name="imapfile" id="imapfile">Imagemap File</a></h2>
  87.  
  88.     <p>The lines in the imagemap files can have one of several
  89.     formats:</p>
  90.  
  91.     <div class="example"><p><code>
  92.       directive value [<var>x</var>,<var>y</var> ...]<br />
  93.       directive value "<var>Menu text</var>" [<var>x</var>,<var>y</var>
  94.       ...]<br />
  95.       directive value <var>x</var>,<var>y</var> ... "<var>Menu text</var>"
  96.     </code></p></div>
  97.  
  98.     <p>The directive is one of <code>base</code>,
  99.     <code>default</code>, <code>poly</code>, <code>circle</code>,
  100.     <code>rect</code>, or <code>point</code>. The value is an
  101.     absolute or relative URL, or one of the special values listed
  102.     below. The coordinates are <code><var>x</var>,<var>y</var></code>
  103.     pairs separated by whitespace. The quoted text is used as the text of
  104.     the link if a imagemap menu is generated. Lines beginning with '#' are
  105.     comments.</p>
  106.  
  107.     <h3><a name="imapfile.directives" id="imapfile.directives">Imagemap File Directives</a></h3>
  108.       <p>There are six directives allowed in the imagemap file. The
  109.       directives can come in any order, but are processed in the
  110.       order they are found in the imagemap file.</p>
  111.  
  112.       <dl>
  113.       <dt><code>base</code> Directive</dt>
  114.  
  115.       <dd><p>Has the effect of <code><base href="<var>value</var>">
  116.       </code>. The non-absolute URLs of the map-file are taken relative
  117.       to this value. The <code>base</code> directive overrides
  118.       <code class="directive"><a href="#imapbase">ImapBase</a></code> as set in a
  119.       <code>.htaccess</code> file or in the server configuration files.
  120.       In the absence of an <code class="directive">ImapBase</code> configuration
  121.       directive, <code>base</code> defaults to
  122.       <code>http://server_name/</code>.</p>
  123.       <p><code>base_uri</code> is synonymous with <code>base</code>.
  124.       Note that a trailing slash on the URL is significant.</p></dd>
  125.  
  126.       <dt><code>default</code> Directive</dt>
  127.  
  128.       <dd>The action taken if the coordinates given do not fit any
  129.       of the <code>poly</code>, <code>circle</code> or
  130.       <code>rect</code> directives, and there are no
  131.       <code>point</code> directives. Defaults to <code>nocontent</code>
  132.       in the absence of an <code class="directive"><a href="#imapdefault">ImapDefault</a></code> configuration setting, causing a status
  133.       code of <code>204 No Content</code> to be returned. The client
  134.       should keep the same page displayed.</dd>
  135.  
  136.       <dt><code>poly</code> Directive</dt>
  137.  
  138.       <dd>Takes three to one-hundred points, and is obeyed if the
  139.       user selected coordinates fall within the polygon defined by
  140.       these points.</dd>
  141.  
  142.       <dt><code>circle</code></dt>
  143.  
  144.       <dd>Takes the center coordinates of a circle and a point on
  145.       the circle. Is obeyed if the user selected point is with the
  146.       circle.</dd>
  147.  
  148.       <dt><code>rect</code> Directive</dt>
  149.  
  150.       <dd>Takes the coordinates of two opposing corners of a
  151.       rectangle. Obeyed if the point selected is within this
  152.       rectangle.</dd>
  153.  
  154.       <dt><code>point</code> Directive</dt>
  155.  
  156.       <dd>Takes a single point. The point directive closest to the
  157.       user selected point is obeyed if no other directives are
  158.       satisfied. Note that <code>default</code> will not be
  159.       followed if a <code>point</code> directive is present and
  160.       valid coordinates are given.</dd>
  161.       </dl>
  162.     
  163.  
  164.     <h3><a name="imapfile.values" id="imapfile.values">Values</a></h3>
  165.  
  166.       <p>The values for each of the directives can any of the following:</p>
  167.  
  168.       <dl>
  169.       <dt>a URL</dt>
  170.  
  171.       <dd><p>The URL can be relative or absolute URL. Relative URLs
  172.       can contain '..' syntax and will be resolved relative to the
  173.       <code>base</code> value.</p>
  174.       <p><code>base</code> itself will not resolved according to the
  175.       current value. A statement <code>base mailto:</code> will
  176.       work properly, though.</p></dd>
  177.  
  178.       <dt><code>map</code></dt>
  179.  
  180.       <dd>Equivalent to the URL of the imagemap file itself. No
  181.       coordinates are sent with this, so a menu will be generated
  182.       unless <code class="directive"><a href="#imapmenu">ImapMenu</a></code> is set to
  183.       <code>none</code>.</dd>
  184.  
  185.       <dt><code>menu</code></dt>
  186.       <dd>Synonymous with <code>map</code>.</dd>
  187.  
  188.       <dt><code>referer</code></dt>
  189.  
  190.       <dd>Equivalent to the URL of the referring document. Defaults
  191.       to <code>http://servername/</code> if no <code>Referer:</code>
  192.       header was present.</dd>
  193.  
  194.       <dt><code>nocontent</code></dt>
  195.  
  196.       <dd>Sends a status code of <code>204 No Content</code>,
  197.       telling the client to keep the same page displayed. Valid for
  198.       all but <code>base</code>.</dd>
  199.  
  200.       <dt><code>error</code></dt>
  201.  
  202.       <dd>Fails with a <code>500 Server Error</code>. Valid for all
  203.       but <code>base</code>, but sort of silly for anything but
  204.       <code>default</code>.</dd>
  205.       </dl>
  206.     
  207.  
  208.     <h3><a name="imapfile.coords" id="imapfile.coords">Coordinates</a></h3>
  209.  
  210.       <dl>
  211.       <dt><code>0,0 200,200</code></dt>
  212.  
  213.       <dd>A coordinate consists of an <var>x</var> and a <var>y</var>
  214.       value separated by a comma. The coordinates are separated
  215.       from each other by whitespace. To accommodate the way Lynx
  216.       handles imagemaps, should a user select the coordinate
  217.       <code>0,0</code>, it is as if no coordinate had been
  218.       selected.</dd>
  219.       </dl>
  220.  
  221.     
  222.  
  223.     <h3><a name="imapfile.quotedtext" id="imapfile.quotedtext">Quoted Text</a></h3>
  224.  
  225.       <dl>
  226.       <dt><code>"<var>Menu Text</var>"</code></dt>
  227.  
  228.       <dd><p>After the value or after the coordinates, the line
  229.       optionally may contain text within double quotes. This string
  230.       is used as the text for the link if a menu is
  231.       generated:</p>
  232.  
  233.       <div class="example"><p><code>
  234.         <a href="http://foo.com/"><var>Menu text</var></a>
  235.       </code></p></div>
  236.  
  237.       <p>If no quoted text is present, the name of the link will be
  238.       used as the text:</p>
  239.  
  240.       <div class="example"><p><code>
  241.         <a href="http://foo.com/">http://foo.com</a>
  242.       </code></p></div>
  243.  
  244.       <p>If you want to use double quotes within this text, you have to
  245.       write them as <code>&quot;</code>.</p></dd>
  246.       </dl>
  247.  
  248.     
  249. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  250. <div class="section">
  251. <h2><a name="example" id="example">Example Mapfile</a></h2>
  252.  
  253.     <div class="example"><p><code>
  254.       #Comments are printed in a 'formatted' or 'semiformatted' menu.<br />
  255.       #And can contain html tags. <hr><br />
  256.       base referer<br />
  257.       poly map "Could I have a menu, please?" 0,0 0,10 10,10 10,0<br />
  258.       rect .. 0,0 77,27 "the directory of the referer"<br />
  259.       circle http://www.inetnebr.com/lincoln/feedback/ 195,0 305,27<br />
  260.       rect another_file "in same directory as referer" 306,0 419,27<br />
  261.       point http://www.zyzzyva.com/ 100,100<br />
  262.       point http://www.tripod.com/ 200,200<br />
  263.       rect mailto:nate@tripod.com 100,150 200,0 "Bugs?"<br />
  264.     </code></p></div>
  265.  
  266. </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  267. <div class="section">
  268. <h2><a name="referencing" id="referencing">Referencing your mapfile</a></h2>
  269.  
  270.     <div class="example"><h3>HTML example</h3><p><code>
  271.       <a href="/maps/imagemap1.map"><br />
  272.       <span class="indent">
  273.         <img ismap src="/images/imagemap1.gif"><br />
  274.       </span>
  275.       </a>
  276.     </code></p></div>
  277.  
  278.     <div class="example"><h3>XHTML example</h3><p><code>
  279.       <a href="/maps/imagemap1.map"><br />
  280.       <span class="indent">
  281.         <img ismap="ismap" src="/images/imagemap1.gif" /><br />
  282.       </span>
  283.       </a>
  284.     </code></p></div>
  285.  
  286. </div>
  287. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  288. <div class="directive-section"><h2><a name="ImapBase" id="ImapBase">ImapBase</a> <a name="imapbase" id="imapbase">Directive</a></h2>
  289. <table class="directive">
  290. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default base for imagemap files</td></tr>
  291. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ImapBase map|referer|<var>URL</var></code></td></tr>
  292. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ImapBase http://servername/</code></td></tr>
  293. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  294. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
  295. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
  296. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_imap</td></tr>
  297. </table>
  298.     <p>The <code class="directive">ImapBase</code> directive sets the default
  299.     <code>base</code> used in the imagemap files. Its value is
  300.     overridden by a <code>base</code> directive within the imagemap
  301.     file. If not present, the <code>base</code> defaults to
  302.     <code>http://<var>servername</var>/</code>.</p>
  303.  
  304. <h3>See also</h3>
  305. <ul>
  306. <li><code class="directive"><a href="../mod/core.html#usecanonicalname">UseCanonicalName</a></code></li>
  307. </ul>
  308. </div>
  309. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  310. <div class="directive-section"><h2><a name="ImapDefault" id="ImapDefault">ImapDefault</a> <a name="imapdefault" id="imapdefault">Directive</a></h2>
  311. <table class="directive">
  312. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default action when an imagemap is called with coordinates
  313. that are not explicitly mapped</td></tr>
  314. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ImapDefault error|nocontent|map|referer|<var>URL</var></code></td></tr>
  315. <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ImapDefault nocontent</code></td></tr>
  316. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  317. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
  318. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
  319. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_imap</td></tr>
  320. </table>
  321.     <p>The <code class="directive">ImapDefault</code> directive sets the default
  322.     <code>default</code> used in the imagemap files. Its value is
  323.     overridden by a <code>default</code> directive within the
  324.     imagemap file. If not present, the <code>default</code> action
  325.     is <code>nocontent</code>, which means that a <code>204 No
  326.     Content</code> is sent to the client. In this case, the client
  327.     should continue to display the original page.</p>
  328.  
  329. </div>
  330. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  331. <div class="directive-section"><h2><a name="ImapMenu" id="ImapMenu">ImapMenu</a> <a name="imapmenu" id="imapmenu">Directive</a></h2>
  332. <table class="directive">
  333. <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Action if no coordinates are given when calling
  334. an imagemap</td></tr>
  335. <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ImapMenu none|formatted|semiformatted|unformatted</code></td></tr>
  336. <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
  337. <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Indexes</td></tr>
  338. <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
  339. <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_imap</td></tr>
  340. </table>
  341.     <p>The <code class="directive">ImapMenu</code> directive determines the
  342.     action taken if an imagemap file is called without valid
  343.     coordinates.</p>
  344.  
  345.     <dl>
  346.       <dt><code>none</code></dt>
  347.       <dd>If ImapMenu is <code>none</code>, no menu is generated,
  348.       and the <code>default</code> action is performed.</dd>
  349.  
  350.       <dt><code>formatted</code></dt>
  351.       <dd>A <code>formatted</code> menu is the simplest menu.
  352.       Comments in the imagemap file are ignored. A level one header
  353.       is printed, then an hrule, then the links each on a separate
  354.       line. The menu has a consistent, plain look close to that of
  355.       a directory listing.</dd>
  356.  
  357.       <dt><code>semiformatted</code></dt>
  358.       <dd>In the <code>semiformatted</code> menu, comments are
  359.       printed where they occur in the imagemap file. Blank lines
  360.       are turned into HTML breaks. No header or hrule is printed,
  361.       but otherwise the menu is the same as a
  362.       <code>formatted</code> menu.</dd>
  363.  
  364.       <dt><code>unformatted</code></dt>
  365.       <dd>Comments are printed, blank lines are ignored. Nothing is
  366.       printed that does not appear in the imagemap file. All breaks
  367.       and headers must be included as comments in the imagemap
  368.       file. This gives you the most flexibility over the appearance
  369.       of your menus, but requires you to treat your map files as
  370.       HTML instead of plaintext.</dd>
  371.     </dl>
  372.  
  373. </div>
  374. </div>
  375. <div class="bottomlang">
  376. <p><span>Available Languages: </span><a href="../en/mod/mod_imap.html" title="English"> en </a></p>
  377. </div><div id="footer">
  378. <p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p>
  379. <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
  380. </body></html>