title: How do I use query string as part of a filename in htaccess rewrite?
body: <p>I need some help with htaccess rewrite rules.</p>
  <p>I need to use the query strings in the URL of a page as part of a filename that exists on the server.</p>
  <pre><code>https://www.example.com/blahblah/somepage.php?somequeryid=234342
  </code></pre>
  <p>somepage.php file does not exist but there is a file named somepage.php?somequeryid=234342 on the server. I am getting an 404 error when I go to the page because the server is expecting somepage.php file which will then use the query string but I need to use the query string as part of the file name.</p>
  <p>best I have come up with is</p>
  <pre><code>RewriteCond %{QUERY_STRING} !^$ 
  RewriteRule ^(.*)$ /$1\%3F%{QUERY_STRING} [L,NE]
  </code></pre>
  <p>but it is not working. I have about a hundred of these with different filenames so I cannot hard code the names.</p>
  <p>Thanks for your help.</p>