program in the distribution, which is an
handling clicks on sensitive images. For versions 2.15 and newer it
is a CGI program (uses the Common
Gateway Interface to communicate with
httpd). See demo.
htimage you should move the executable
binary to the same directory as your other server scripts are, and
remember to set up an exec rule. For example if your scripts are in
/usr/etc/cgi-bin, you could have an
rule like this:
Exec /htbin/* /usr/etc/cgi-bin/*Often
htimage is one of the most often used scripts, and
it would therefore be nice to refer to it with as short a name as
/img, so you could have a
rule just before the
Map /img/* /htbin/htimage/* Exec /htbin/* /usr/etc/cgi-bin/*
ISMAP in your inlined image call, and
to the script handling the request
image configuration file name appended to it.
an image configuration file. These files are referred to by the extra path information in the URL
causing the call to
<A HREF="/htbin/htimage/image/config/file"> <IMG SRC="Image.gif" ISMAP></A>Image configuration file can be:
htimage will look for both of these (afterall, it gets
environment variables from
You can even do some very smart mappings in the rule file to allow
very short references to
htimage and picture
configuration files. Let's suppose all your image configuration files
are in directory
/usr/etc/images. Then you can use the
following two rules in your server's configuration file (by default
Map /img/* /htbin/htimage/usr/etc/images/* Exec /htbin/* /usr/etc/cgi-bin/*In this case you can refer to your image mapper very easily; if you have an image configuration file
/usr/etc/images directory, all you need to say in the
anchor is this:
<A HREF="/img/Dragons.conf"> <IMG SRC="Image.gif" ISMAP></A>
circle (x,y) r URL
rectangle (x1,y1) (x2,y2) URL
polygon (x1,y1) (x2,y2) ...
So first point is added also as the last one if necessary.
def, circ, rect, poly.
Shapes are checked in the order they appear in config file, and the
URL corresponding to the first match is returned. If none match, the
default URL is returned.
htimage prints a single
stdout, or an error message with preceding
Content-Type: text/html so in fact
behaves exactly as any other CGI/1.0 program (script), and is not
in any way handled specially by the server. Therefore, you can
htimage to whatever you prefer, like we called it
/img in the above example.
Server understands this
Location: field, and either
directly sends that file to the client (non-full URL), or sends a
redirection to client causing it to fetch the document, maybe even
from another machine.
Note that URLs returned by
htimage may well be other
script requests - there is no reason for being limited to just regular