title: Removing question mark from query string with apache and htaccess
body: <p>I have a PHP page with querystring:</p>
  
  <pre><code>http://project.dev/?a=b&amp;c=d
  </code></pre>
  
  <p>As you know, I can access the querystring with <code>$_GET</code> superglobal array:</p>
  
  <pre><code>print_r($_GET);
  /*
  Array
  (
      [a] =&gt; b
      [c] =&gt; d
  )
  */
  </code></pre>
  
  <p>I want to remove questionmark from querystring with Apache and <code>htaccess</code>, so when a user see my website with this address:</p>
  
  <pre><code>http://project.dev/a=b&amp;c=d
  </code></pre>
  
  <p>It will be identical to this address:</p>
  
  <pre><code>http://project.dev/?a=b&amp;c=d
  </code></pre>
  
  <p>and I can access the querystring as before: with <code>$_GET</code> superglobal array.</p>
  
  <p><strong>Some Important Notes:</strong></p>
  
  <ol>
  <li><p>I don't want to redirect user from URL <strong>without</strong> question mark to the URL <strong>with</strong> question mark.</p></li>
  <li><p>I have both <code>GET</code> and <code>POST</code> requests to this page.</p></li>
  <li><p>The querystring can <strong>have</strong> questionmark <code>?</code> itself, for example:<br>
  <code>http://project.dev/?a=b&amp;c=d?x=y</code>.</p></li>
  <li><p>I want the addresses with question mark, automatically <strong>redirect</strong> to the one without question mark. For example when a user come to my site with this address:<br>
  <code>http://project.dev/?a=b&amp;c=d</code><br>
  I want to redirect user to this address:<br>
  <code>http://project.dev/a=b&amp;c=d</code>.</p></li>
  <li><p>My website has only one page: <code>index.php</code>. Without any subfolders.</p></li>
  </ol>
  
  <p>How can I do this in <code>htaccess</code>?</p>