mod_rewrite is a great tool but the regex syntax is bizarre.
Basically, I'm moving to a new site and I need to redirect users to new pages. If someone goes to:
"index.php?name=Forums&file=viewtopic&t=854"
I need to redirect them to
"/bb/viewtopic.php?t=854"
This is my code thus far:
Code:
RewriteRule ^(.*)index.php\?(.*)$ /bb
This is NOT WORKING! Obviously it's a bit bare, but if you go to
"index.php?name=Forums&file=viewtopic&t=854"
it does not get redirected. As soon as I remove that last question mark (and the backslash) it starts redirecting again... what am I doing wrong? Is there some weird way to escape question marks?