Well, I added this to apache's httpd.conf:
and then added into showthreaded.pl:
my $sth = $dbh->prepare ("SELECT B_Board FROM w3t_Posts where B_Number = ?");
$sth->execute($FORM{Number});
($FORM{Board}) = $sth->fetchrow_array;
}The first part just transforms all URL's that look like:
/p/something
to:
/perl/forum/showthreaded.pl?Number=something&lookup=1
I had to add the second part as showthreaded.pl requires you to pass in the board name for some strange reason.
Hope that helps,
Alex
--
Gossamer Threads Inc.
Code:
RewriteRule /p/(.+) http://gossamer-threads.com/perl/forum/showthreaded.pl?Number=$1&lookup=1 [R,L]Code:
if ($FORM{lookup}) { my $sth = $dbh->prepare ("SELECT B_Board FROM w3t_Posts where B_Number = ?");
$sth->execute($FORM{Number});
($FORM{Board}) = $sth->fetchrow_array;
}
/p/something
to:
/perl/forum/showthreaded.pl?Number=something&lookup=1
I had to add the second part as showthreaded.pl requires you to pass in the board name for some strange reason.
Hope that helps,
Alex
--
Gossamer Threads Inc.