I would like to have a user's name as a part of a URL, e.g. mysite.com/username. This should redirect to the user profile. I use Profile 2 and Pathauto, but I am not sure how to do this.
Asked
Active
Viewed 975 times
2 Answers
2
With pathauto, you just have to configure user paths with a user token, e.g. [user:name]
.

soju
- 25,111
- 3
- 68
- 70
-
What do you mean? Under section Pattern for all Profile paths I put [current-user:name]. This doesnt seem to work unfortunately. – Vonder May 11 '11 at 13:34
-
I need a pattern for Username I guess but I dont know the correct syntax. – Vonder May 11 '11 at 13:48
-
It says [user-raw] is invalid, all other replecment patterns do not seem to work. – Vonder May 11 '11 at 14:34
-
I forgot, you need token module for this – soju May 11 '11 at 19:06
1
Pathauto pattern of [user:name]
under User paths should do the trick.

nmc
- 8,724
- 5
- 36
- 68
-
The problem is that it works for user page. But I would like to do it for profile page. When I put the same pattern under Profile paths it says it is not valid. – Vonder May 17 '11 at 14:54