Want to add a search engine to your Web site but don't know how? Well, today's your lucky day! In this tutorial, find out how to obtain, install and use the popular ht://Dig indexing engine to add powerful, effective search capabilities to your site with minimal time and fuss.
When ht://Dig is first installed, a sample search form is automatically installed into the directory specified via the "--with-search-dir" configuration parameter. In this particular example, I had specified that the form be installed to "/usr/local/apache/htdocs/htdig/sample" - so trot on over there and take a look inside:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>ht://Dig WWW Search</title> </head> <body bgcolor="#eef7ff"> <h1> <a href="http://www.htdig.org"><IMG SRC="/htdig/images/htdig.gif" align="bottom" alt="ht://Dig" border="0"></a> WWW Site Search</h1> <hr noshade size="4"> This search will allow you to search the contents of all the publicly available WWW documents at this site. <br> <p> <form method="post" action="/cgi-bin/htsearch"> <font size="-1"> Match: <select name="method"> <option value="and">All <option value="or">Any <option value="boolean">Boolean </select> Format: <select name="format"> <option value="builtin-long">Long <option value="builtin-short">Short </select> Sort by: <select name="sort"> <option value="score">Score <option value="time">Time <option value="title">Title <option value="revscore">Reverse Score <option value="revtime">Reverse Time <option value="revtitle">Reverse Title </select> </font> <input type="hidden" name="config" value="htdig"> <input type="hidden" name="restrict" value=""> <input type="hidden" name="exclude" value=""> <br> Search: <input type="text" size="30" name="words" value=""> <input type="submit" value="Search"> </form> <hr noshade size="4"> </body> </html>