Redirect users with "." (dot) in their username and replace with "-" (dash) to correct profile

Im having problem with usernames that have '.' (dot) in their username and throwing 404 when try to access their profile page in front end. Can we replace this '.' (dot) with '-' (dash) because working url is with a '.'(dash).

The system only generates link with user name ex: domain.com/members/[username automatically added]

but some username includes '.' (dot) which system dont recognize.

Ex: domain.com/members/user.name - 404

domain.com/members/user-name - working

Topic username url-rewriting redirect login Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.