Ignore all query parameters

How can I achieve the following?

website.com/index.php?foo=2
website.com/index.php?foo=3
website.com/index.php?bar=4

All three should be for 1 page (index.php), but currently they are for 3 separate pages. How can I ignore ALL query parameters?

Go to Admin > Manage > Websites and add the query parameter to exclude. see: How do I exclude URL query parameters from the URLs tracked, and from Pages reports? - Analytics Platform - Matomo

Thanks for taking the time to answer Matt! That’s not what I asked to be able to accomplish, but I did find a way to do it in the javascript API.


          var page_url = location.href;
          var query_pos = location.href.search( /\?/ );
          // if there is a query, only take the url up to the '?' 
          if( query_pos >= 0 ) 
          {
              page_url = location.href.substr( 0, query_pos );
          }
          _paq.push(['setCustomUrl', page_url]);