Skip to main content.
home | support | download

Back to List Archive

Re: Getting link to pages right in swish.cgi

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Wed Jan 15 2003 - 16:39:43 GMT
On Wed, 15 Jan 2003, John Almberg wrote:

> I've got swish.cgi working (very cool.) One problem: the links to the 
> pages included the directory path info, like this:
> 
> http://www.mywebsite.com/home/mydir/public_html/index.com.
> 
> This obviously doesn't work.  I kludged a fix:
> 
>            my $docpath = $h{swishdocpath};
>            $docpath =~ s/\s/%20/g;  # Replace spaces
>            $docpath =~ s|home/mydir/public_html/||g;  # Remove 
> /home/mydir/public_html from link
>            $h{swishdocpath_href} = ( $self->config('prepend_path') || '' 
> ) . $docpath;
> 
> but suspect there is a more elegant way to do this! Any hints?

Use the ReplaceRules config option while indexing.

Otherwise, the above is elegant enough. ;)

-- 
Bill Moseley moseley@hank.org
Received on Wed Jan 15 16:39:58 2003