I see that I'm digging up an old thread, but I have a solution to the problem discussed.
The answer is rewriting!
Code:
RewriteRule ^f([0-9]+)/s([^/]*)/$ /forumdisplay.php?forumid=$1&s=$2 [L]
RewriteRule ^t([0-9]+)/s([^/]*)/thread\.html$ /showthread.php?threadid=$1&s=$2 [L]
RewriteRule ^[ft]([0-9]+)/s([^/]*)/(.+)$ /$3 [L]
I've modified the first 2 rules a bit to make things easier. The 3rd rule simply changes any URL like "/f1/s1/newreply.php" that would normally cause a problem and just rewrites it to "/newreply.php". This should also work for any images. No need to muck with templates.