title: Removing parameters from url (js or php)
body: <p>I have some parameters in url that are added when coming to a specific page, so correct page is opened. For example:
  <a href="https://example.com/index.php?cCode=SFI=&amp;cmpn=cHJvdmlkaW8=" rel="nofollow noreferrer">https://example.com/index.php?cCode=SFI=&amp;cmpn=cHJvdmlkaW8=</a>
  Now, when i get to that page, i want to remove them, so they don't get passed further, but still want to keep any additional parameters, like source=facebook or whatever... I found a way to remove them with this code:</p>
  <pre><code>var urlParts = url.split('?');
  var params = new URLSearchParams(urlParts[1]);
  params.delete('cCode');
  params.delete('cmpn');
  var newUrl = urlParts[0] + '?' + params.toString();
  history.pushState(null, null, newUrl);
  </code></pre>
  <p>But they still get forwarded when i click on a some link... Any way to do this, with js or even php?</p>