Support: Hosting

Return to Personal

Can I make my site searchable?

VISI uses Excite for Web Servers (EWS) to provide search capability to the VISI web site, and to individual users home pages.

We've also made modifications to the EWS software to allow search results to be restricted to a specified pattern. This effectively allows any individual user to use EWS to provide search capability to their personal home page. To do so, you'll need to set up a search form as follows...

<form method="POST" action="/cgi-bin/search.cgi">                               

  <input type="hidden" name="source" value="users">
  <input type="hidden" name="url_regex" value="/~username/">
 

  <p>Enter keywords or a concept to search for:<br>
  <input name="search" value="" size="40"></p>
 

  <p><a href="/Excite/AT-queryhelp.html">Help on searching</a></p> 

  <p><input type="submit" value="Submit"></p> 

</form> 

The input "url_regex" is used to restrict search results. The text pattern "/~username/" will restrict search results to your web pages. If you're familiar with Perl regular expressions, more complex filters are possible.

EWS normally displays the first twenty hits of its search results, sorted by confidence (how closely the page matched the search keywords or concept). To change the number of hits displayed, add the input "max_hits" as follows to your search form...

    <input type="hidden" name="max_hits" value="40"> 

Search Results Template
EWS normally displays its search results in a page using the VISI web site layout and appearance. To use your own home page layout and appearance, set up a template file as follows...

<html>                                                                         
<head>
  <title>Search Results for My Home Page</title>
</head>
<body bgcolor="#FFFFFF">
 

<h1>Search Results for My Home Page</h1> 

<!-- BEGIN OF DATA -->
<!-- END OF DATA -->
 

</body>
</html>
 

The "BEGIN OF DATA" and "END OF DATA" markers are used to place the search results in the page. Save or upload the template file into your "www" folder, and change your search form as follows...

    <form action="/cgi-bin/search.cgi/~username/template.html" method="post"> 

Where "username" is your username and "template.html" is the full filename of your template file.

Setting File Permissions
Finally, your "www" folder must be world readable and executable so that the indexer can read the directory for a list of files. You can change file permissions using the chmod command from a UNIX command prompt.

    chmod 755 ~/www 

If you have a sub-folder which you do not want indexed by the search engine, you should make that sub-folder world executable only.

    chmod 711 ~/www/secret 

For more information about UNIX file permissions and your home page, please refer to our Setting File Permissions web page.