Remove author (user) slug (permalink base) for a Multisite

I have a Multisite WordPress installation in which I want to change the structure of user permalinks by removing the base “/user/”

Current:

domain.com/user/unsername

I want:

domain.com/username

I found the following thread with the function that works quite well since I tested it in an individual WordPress installation (Not Multisite):
https://stackoverflow.com/questions/3629323/remove-author-prefix-on-wordpress

I tried to include the same function in a Multisite WordPress installation and I verified that the first part of the function works but the second function that does the redirection does not work and the link structure is like this:

domain.com/domain.com/user/username

Help me please 🙂

Read more here:: Remove author (user) slug (permalink base) for a Multisite

Leave a Reply

Your email address will not be published. Required fields are marked *