I want to redirect a page to another page based on user's username. For Example, If I have a page with URL something like "sitename/store" and when user open that page, it should redirect to page with URL like "sitename/store/username". In this scenario, username is variable. Is there any code which is available in functions.php? or is there any way to achieve this.
Thanks