title: Redirect and keep the parameter in the url on .htaccess
body: <p>It should probably be an easy setup, but without familiarity with the terms used, I can't come up with a solution. I tried several examples that I found on the internet.</p>
  
  <p>I just wanted that when the user accessed the site via a url <code>https://example.com?foo=bar</code> he would be directed to <code>https://www.example.com/new-nice-page?foo=bar</code></p>
  
  <p>Changing the page and keeping the parameter.</p>
  
  <p>The last thing I tested: </p>
  
  <pre><code>RewriteEngine on
  RewriteRule ^https://www.example.com/new-nice-page?foo=$ example.com?foo=$1 [QSA]
  </code></pre>