Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Rewriting search.cgi solution

Quote Reply
Rewriting search.cgi solution
File .htacess add

Code:
RewriteEngine On
RewriteBase /
Options +FollowSymLinks
RewriteRule tag-(.*)-([0-9]+).html /cgi-bin/search.cgi?query=$1;nh=$2 [L]

Edit Links\User\Search.pm
line 235
find
Code:
my $url = $CFG->{db_cgi_url} . "/" . $IN->url;

replace by
Code:
my $url = $CFG->{build_root_url} . "/tag-" . $term;

Edit Links\Utils.pm
find line 319
Code:
$ret .= index($url, '?') != -1 ? ';' : '?';
$ret .= "nh=$page";

Replace by

Code:
#$ret .= index($url, '?') != -1 ? ';' : '?';
$ret .= "-$page.html";

Call your page like that:

http://www.mywebsite/tag-mysearchterms.html
Subject Author Views Date
Post Rewriting search.cgi solution dujardin 1689 Mar 18, 2008, 1:46 AM