RWP Website Search Engine
Usage Notes
October 11, 1996
------------------------------------------------------------------------

Installation is simple. 
  Unzip the archive. 
  Copy rwpsearch.exe into the win-cgi directory on your server. 
    For O'Reilly WebSite, this is typically C:/WebSite/cgi-win. 
  Copy rwpsearch.dat into the same directory as the executable. 

------------------------------------------------------------------------

The software is now installed. Next, edit the rwpsearch.dat file. It only
has three lines. A typical rwpsearch.dat file is shown below:
    C:\website\htdocs
    http://www.mydomain.com
    search.rwt

Here is what each of the lines do:
The first line - C:\website\htdocs - tells the search program the physical
    location of the base directory of your webserver.
The second line - http://www.mydomain.com - tells the search engine the 
    base URL of your website. 
The third line - search.rwt - tells the search engine the name of the 
    template file to use to customize your search return page. This is 
    just a normal HTML document that contains only the code you need to 
    send the top of the page, above the actual search return.
NOTE: Do not use trailing slashes "/" or "\" on any of these lines.

------------------------------------------------------------------------

What is this template file thing, anyway?
Ah, a very good question.
Without a template file, the search engine simply returns a page with a 
plain white background, and a caption of "Search Results".
With a template file, you can make the page look like the rest of your 
website - of give it any look you desire.
Here is a typical Template file:

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//3.2">
    <HTML>
    <HEAD>
    <TITLE>Search Results</TITLE>
    </HEAD>
    <BODY BACKGROUND="/images/bg.gif" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF0000" ALINK="#808080">
    <CENTER>
    <H2>My Homepage Search Says</H2>
    <BR>
    <A HREF="search.htm">Back to the search page</A>

Note that there is no </BODY> or <HTML> tags. They are returned by the 
search engine after it has shown the search results.
You can place a different copy of the template file in each directory 
that you want to search, if you desire. If there is a template in the 
directory specified by the search form, it will be used. If there is not, 
the search engine will check the cgi-win directory for one. If one is 
there, it will use it. If not, the program will use the default internal 
page top.

------------------------------------------------------------------------

Set up your search form

The last thing to do is to set up your search form(s).
Below is an example, and comments on what is in it.

    <FORM METHOD=POST ACTION="/cgi-win/rwpsearch.exe/Form">
    <INPUT TYPE="HIDDEN" NAME="numdir" VALUE="1">
    <INPUT TYPE="HIDDEN" NAME="path1" VALUE="\">
    <INPUT TYPE="HIDDEN" NAME="url1" VALUE="/">
    <B>Search For:</B> <INPUT NAME=keywords SIZE=50><BR>
    <INPUT TYPE=SUBMIT VALUE="Find Documents">
    <INPUT TYPE=RESET VALUE="Clear">
    </FORM>


Okay, let's look at it a line at a time.

The first line is simply the form action: "/cgi-win/rwpsearch.exe/Form". 
Note that you must make sure the directory specified is correct.

The second line tells the search engine how many directories you want 
to search: <INPUT TYPE="HIDDEN" NAME="numdir" VALUE="1"> This hidden 
field - "numdir" must be specified.

The next line - <INPUT TYPE="HIDDEN" NAME="path1" VALUE="\"> - tells the 
search engine the physical path to be searched, relative to the default 
directory defined in the rwpsearch.dat file. Using our examples, this 
would search the HTML document root "\" under the directory 
"C:\website\htdocs" - that is, "C:\website\htdocs\".

The fourth line - <INPUT TYPE="HIDDEN" NAME="url1" VALUE="/"> - tells 
the search engine the logical path to be searched, relative to the 
default directory defined in the rwpsearch.dat file. Using our examples, 
this would search the logical directory "/" under the webserver home 
directory "http://www.mydomain.com" - that is, "http://www.mydomain.com/". 
This is used to prefix the returned file names with a complete, qualified URL.

The "pathn" and "urln" hidden inputs should be repeated as many times as you specified in the numdir field, each time specifying the directory information as specified above.

The last significant line - <B>Search For:</B> <INPUT NAME=keywords 
SIZE=50><BR> - passes the keywords to search for to the search engine. 
The SIZE parameter can be changed as you desire, up to 255 characters.

------------------------------------------------------------------------

Copyright  1996 by Ryburn Web Productions. All Rights Reserved. 