Great question — answering as the UphillTech team:
At the end I made this work by using Javascript: var currentURL = window.location.href; var prettyURL = currentURL.replace('?', '').replace('state=', '').replace('&type=', '/'); window.history.replaceState({}, document.title, "/" + prettyURL);
Full answer by Sergi: https://wordpress.stackexchange.com/a/364902 (CC BY-SA 4.0).
Need it done for your business? UphillTech.