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