YOU DON’T HAVE TO BE A COMPUTER GENIUS TO…
Add a Simple Search Box to your Website!!!


Your personal website is finally shaping up.  You have an enticing front page with links to your favorite sites, your family photos, articles you’ve written and family recipes. Yup, your website is ready for search capabilities! There are many ways to accomplish this but the simplest way is to use the default search feature your web hosting company gives you.

I just added “search” to the front page of my website and guess what I discovered…YOU DON’T HAVE TO BE A COMPUTER GENIUS TO…Add a Simple Search Box to Your Website!!! 

Here’s a step-by-step guide to what I did.  ONE DISCLAIMER.  I WILL BE DESCRIBING THE STEPS I TOOK USING THE WEBHOSTING AND SOFTWARE SERVICES I HAVE CHOSEN.  IF YOU HAVE DIFFERENT BACK-END SUPPORT, YOU WILL HAVE TO ADJUST ACCORDINGLY.

My Tools:

  1. Windows98
  2. Web2010 as my hosting company, using UNIX
  3. WS_FTPLE (32-bit) for my file transfer protocol
  4. Dreamweaver as my web page designing software

Overview:

Creating “search” on a site is a dynamic feature employing CGI scripts. 

Step-by-Step:

  1. Call Up Search.CGI.   First, I went to START on Windows 98, clicked on PROGRAMS then on my WS_FTP program and connected to my remote site on Web2010’s servers.  (Note:  My FTP program has the contents of my computers hard drive llisted on the left and the contents of my domain on the right.)   I opened the “cgibin” directory where my default cgi scripts are and highlighted the file “search.cgi.”  I FTP’ed that to my C: Drive so I now had a copy in my C: Drive as well.

  2. Edit the "search.cgi” File to Change the Base URL. Once in my C: Drive (I put everything in Dreamweaver, but you can put the file anywhere as long as you can use a text editor.), I opened the file and saw a page full of code.  One third of the way down, there was a paragraph that began with…# Define Variables# $basedir ="/mnt/web/guide/yourdomain/www";$baseurl =http://marlenehollander.com/"    I had to actually overwrite the yourdomain with my domain name.

  3. FTP. I saved the “search.cgi” file and FTP’ed it back to my root directory in my “cgibin” so it would replace the old “search.cgi.”

  4. Edit "search.html" file. Next, while still in my root directory (the one above my “www” directory), I highlighted the “search.html” file Web2010 had put in my root directory and FTP’ed it to my C: Drive so I could edit the default search box. Once on my C: Drive, I opened the “search.html” file in Dreamweaver and played around with the colors and put a link from my index.html page to my newly-edited “search.html” page.
     
  5. Search on "index.html." If you want the search box to appear on your “index.html” page, that is easy to do as well.  I created a table and cut and paste the source code from the “search.html” file write into the source code of my “index.html” file.
     
  6. FTP'ed. After saving my work in dreamweaver, I FTP’ed my newly edited “search.html” file into my “www” directory.  IMPORTANT:  Do not FTP the newly edited “search.html” file into the root directory; it must go into “www”.  Also, you must FTP your “index.html” file so it reflects the new changes.
     
  7. Voila.  I had a search box on my site and so can you!

Copyright © 2000-2001 Marlene Hollander.  All rights reserved.