Lo que pasa es que la QUERY_STRING no se captura:
Cita: What is matched?
The Pattern will initially be matched against the part of the URL after the hostname and port, and before the query string. If you wish to match against the hostname, port, or query string, use a RewriteCond with the %{HTTP_HOST}, %{SERVER_PORT}, or %{QUERY_STRING} variables respectively.
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
Prueba así:
Código Apache:
Ver originalRewriteCond %{QUERY_STRING} name=Forums&file=viewtopic&t=([0-9]+)
RewriteRule ^modules\.php /foro/viewtopic.php?f=17&t=%1 [R=301]