title: htaccess redirects that ignore query string
body: <p>I've recently inherited a webserver whose IP previously belonged to a well known band's forums. </p>
  
  <p>Problem is I'm now drowning in 404 errors!</p>
  
  <p>The URLs in question look like this:</p>
  
  <pre><code>http://[server_ip]/forum/ucp.php?mode=register&amp;coppa=0
  http://[server_ip]/forum/viewtopic.php?f=3&amp;t=45330
  http://[server_ip]/forum/index.php+++++++++++++++++++++++++++++++++++++++++++++++Result:+%ED%E5+%...
  http://[server_ip]/forum/viewtopic.php?f=3&amp;t=44597&amp;start=0
  </code></pre>
  
  <p>In an ideal world I would like to redirect any traffic going to /forum/ucp.php, /forum/viewtopic.php or /forum/index.php elsewhere regardless of query string. </p>
  
  <p>Or anything going to /forum/.* elsewhere, if that's doable. </p>
  
  <p>I've tried a number of different solutions with little success, any help appreciated.</p>