Designing search.htm

This section assumes that you are using the CGI front end.

Relative links in search.htm

It might be worth mentioning that search.htm is parsed by search.cgi which usually resides in the /cgi-bin/ directory of your Web server. When you open http://site-name/cgi-bin/search.cgi in your browser, all relative links are considered as relative to the /cgi-bin/ directory. Therefore, if you have a file system structure like


   /var/www/images/
   /var/www/html/
   /var/www/cgi-bin/

the correct relative link from search.cgi to the images in /images/ will be

<img src="../images/image.gif">

Adding a small Search form to the other pages of your site

To add a small search form to any of your pages, you can put the following code:


<FORM METHOD="GET" ACTION="/cgi-bin/search.cgi">
  <INPUT TYPE="text" NAME="q" VALUE="">
  <INPUT TYPE="submit" VALUE="Search!">
</FORM>