I need to redirect the URL like viewforum.php?f=123 in Apache main conf file, I have tried every format I can think of, but it still doesn’t trigger it. I have something very similar which works well, the only difference is that one doesn’t have the question mark. Here is what I have tried:
RewriteEngine On
RewriteRule viewforum\.php\?f=([0-9]+) http://www.newdomain.com/phpbb2vb.php?oldforumid=$1 [L,R=301]
RewriteRule ^viewforum\.php\?f=([0-9]+)$ http://www.newdomain.com/phpbb2vb.php?oldforumid=$1 [L,R=301]
RewriteRule ^/viewforum\.php\?f=([0-9]+)$ http://www.newdomain.com/phpbb2vb.php?oldforumid=$1 [L,R=301]
RewriteRule ^/viewforum.php?f=([0-9]+)$ http://www.newdomain.com/phpbb2vb.php?oldforumid=$1 [L,R=301]
RewriteRule ^/viewforum.php/?f=([0-9]+)$ http://www.newdomain.com/phpbb2vb.php?oldforumid=$1 [L,R=301]
…
And other possible combinations.
None of them worked, I have worked on this since yesterday. Any help would be greatly appreciated.