Is it possible to replace page arguments with new ones in a view exposed filter? I'm creating a views filter with the exposed form.



After its submitting a new page is loaded with arguments like these (I use the Acquia Dev desktop)

http://pal.dd:8083/en/cities?country_id=2&amp;region_id=4


I want to make the string shorter, for example, like this

http://pal.dd:8083/en/cities?geo=2_4


And in the query() method transcribe this argument and get country and region value from it.

I'm wondering, is it possible to do it inside the view filter class?

I tried to manipulate with the values of the exposed form in the submitExposed function, but I didn't manage to achieve the positive result. 

Has anybody run into it?
You can adjust the default Filter identifier for each Exposed Filter in its settings. The Description: 


  Filter identifier
  _
  This will appear in the URL after the ? to identify this filter. Cannot be blank. Only letters, digits and the dot ("."), hyphen ("-"), underscore ("_"), and tilde ("~") characters are allowed. 


In your case you can chage the first one to geo and the other to _. That way you get the output: 

cities?geo=2&amp;_=4

although you'd probably name the second one to something more meaningful, like region: 

cities?geo=2&amp;region=4

For full control use the module Query Parameters To URL (Drupal 8 version Needs work).