Create an .htaccess file in your root directory and put the following:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^forumdisplay.php?f=([0-9]+)$ ./forums/forumdisplay.php?f=$1 [R=301, L]
RewriteRule ^showthread.php?t=([0-9]+)$ ./forums/showthread.php?t=$1 [R=301, L]
Let's examine the first rule. It says that when you see a URL in the form of forumdisplay.php?f=some number, redirect to ./forums/forumdisplay.php?f=X where X is whatever the number just happens to be. The R=301 part means to do a 301 Redirect Permanent on the URL, which basically means that the content has moved from the old location to the new location, so pass any Google PR, etc. to the new URL. The L part means (to the best of my knowledge) that if a URL qualifies for this rule, apply it and then stop parsing the .htaccess file. (i.e. don't continue following other rules, because the URL will not apply to multiple rules in this file).
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 163
The Queen of DaniWeb
Offline 13,646 posts
since Feb 2002