Place this line directly at the end of the route.rb file (so that it does not interfere with other controller routes)
map.connect "/: username",: controller => "users",: action => "show"
in users_controller, use the following line to retrieve the user
@user = User.find_by_username (params [: username])
I don’t think that this would require any nginx magic or rewriting of URLs.
NTN
source
share