Skip to main content.
home | support | download

Back to List Archive

Re: Changing the output location of a returned result

From: Bill Moseley <moseley(at)>
Date: Thu Dec 04 2003 - 14:17:38 GMT
On Thu, Dec 04, 2003 at 05:02:13AM -0800, Matt Torbin wrote:

> http://[myServerIP]/var/www/html/pdfs/[fileName].pdf
> http://[myServerIP]/pdfs/[fileName].pdf

In addition to Suzanne suggestion, if your search results are on the 
same machine as the pdfs, they you can also just remove the prefix:

   ReplaceRules remove http://[myServerIP]/var/www/html

> Where should I look to make this change?  Is this something that I can 
> change in search.cgi?  Please advise.

You have to do that at indexing time.  If you don't want to reindex, 
sure, you can either modify the string in the cgi script.  If using 
swish.cgi I'd probably modify it in the template module -- of if you are 
using Template-Toolkit for output generation you can filter the path 
right in the template:

But I think using ReplaceRules on indexing is the best.

Bill Moseley
Received on Thu Dec 4 14:18:39 2003