Sure...I'm using apache mod_rewrite to do that. I don't have an official mod put together, and there are still a few bugs I need to work out, but here is what I did:
1. Create the rewrite rules in an .htaccess file. The file looks like this:
RewriteEngine On
RewriteRule ^topic/([0-9]+)/(.*)/new/$ viewtopic?id=$1&action=new [L]
RewriteRule ^topic/([0-9]+)/(.*)/([0-9]+)/$ viewtopic.php?id=$1&p=$3
RewriteRule ^topic/([0-9]+)/(.*)(/?)$ viewtopic.php?id=$1 [L]
RewriteRule ^forum/([0-9]+)/(.*)(/?)$ viewforum.php?id=$1[L]
2. Added a function in the file functions.php. I put the function just below the function pun_htmlspecialchars(). The function looks like this:
function simplify ($str)
{
$replace = array('`','~','!','@','#','$','%','^','&','*','(',')','_','=','+','\\','|','}',']','{','[','"',';',':',',','<','.','>','?','/',' ');
$str = str_replace($replace,'-',$str);
$str = str_replace('\'','',$str);
$str = preg_replace('/[-]+/s','-',$str);
$str = preg_replace('/-$/s','',$str);
return $str;
}
Again, kind of brute force...
3. Worked through the code in viewforum.php and viewtopic.php to change the links from the old viewtopic.php?id=1 or viewforum.php?id=1 to the new URL's. This is definitely the most time consuming part.
4. I also had to work my way through some files to make sure that all links started with a forward slash (<a href="/index.php"> as opposed to <a href="index.php">).
Again, I wish I had an official mod, but that is basically what I did. If you have specific questions about what I did, I'd be glad to offer any assistance I can.
NFL-Forums.com administrator