Is it possible to setup the URLs for profiles as website.com/username rather than website.com/profile/username for example

I found your post here about that How to restart current page parameters? (Keys)

and it might be what I am looking for. However it seems like it will adjust a page’s URL not change it. So if someone goes to website.com/profile/username I could have it remove the profile part and just show website.com/username

but if someone just goes directly to website.com/username via a link or typing it in the address bar, would it still work?