Can't clean URL from custom query parameters I have a client whose company has different branches. The data are retrieved from a DB (not the Drupal one). 
For example, the url mydrupalsite.com/branch?branchID=1 should lead to mydrupalsite.com/branch/1, mydrupalsite.com/branch?branchID=23 to mydrupalsite.com/branch/23. 
I have created a page for the branches, at which the content will change slightly and dynamically, according to the branch we choose.
 I've tried using InboundPathProcessorInterface(), OutboundPathProcessorInterface() and PathProcessorAlias(), but I can't get rid of the query ?branchID=23, so I only get mydrupalsite.com/branch/23?branchID=23.

Is there any way to achieve that?
I think you can use Redirection Rules in your .htaccess file to achieve this task.

&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine on
  RewriteCond %{REQUEST_URI} ^(/branch)$
  RewriteCond %{QUERY_STRING} branchID=(.*)
  RewriteRule (.*) /branch/%1?  [R=301,L]
&lt;/IfModule&gt;


Hope, this helps you.