I have a php function that goes something like this:
replace (?<!/)viewtopic.php\?forum=([0-9]*)&thread=([0-9*]) with forum\\1/thread\\2.htm, which correctly changes the URLs to the forum[0-9]/thread[0-9].htm format, as expected.
I then have a rewrite rule that looks like this: RewriteRule ^forum([0-9]*)/thread([0-9]*).htm viewtopic.php?forum=$1&thread=$2 which should, to my mind, use forum[0-9] to equal forum=[0-9] and ditto for thread. However, it doesn't. Instead of forwarding to the thread (via the thread= variable) it just loads the forum (via the forum= var) in the rewritten URL. I've checked the query string itself, and forum=1&thread=2 (for example) definately exists and points to a generated thread, so I can only assume that there is somethign wrong with my rewrite rule, only I can't see it :)
Right, well, nevermind. Dismiss this post, I've realised the rewrite rule worked, it was just conflicting with another one (RewriteRule ^forum([0-9]*).* viewforum.php?forum=$1 for reference's sake). So hurrah.