Ok, thanks Gizmo. I took a look, but those files aren't quite what I was after - though to be fair I probably didn't quite say what I meant!
It's to do with changes in the URL structure from the dynamic URLs to search engine friendly URLs. The SE friendly URL system is great, but currently it leads to a duplicate content. Take this:
forums/ubbthreads.php?ubb=cfrm
and this...
forums/ubbthreads.php/ubb/cfrm
The thing is BOTH of these addresses are valid, but I only want the SECOND to lead to a page - the first I want to 301 redirect. Now, I've discovered that I can use something like the following to match up query string pairs for an htaccess redirect:
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /forums/forumcode\.php\?([^=]+)=([^&]+)&([^=]+)=([^&\ ]+)\ HTTP/
RewriteRule ^forumcode\.php$ http://www.example.com/forums/forumcode.php/%1/%2/%3/%4? [R=301,L]
However, though this reconstructs the query string in order, often the result is a database error, so it clearly isn't the foolproof method. So, has anyone done any work on this? HELP?
ADD - It occurs to me that this COULD be achieved in the UBBThreads PHP. If a query string is set, then rather than dealing with it it could be 301 Redirected to the SE friendly address. At least as an option for SEO bent admins?!??!