Possible Duplicate:
Create vanity URLs in a LAMP configuration
Once a user registers, I want the username they have chosen to be used to generate a unique profile page viewable to anyone (not just the user). If “bob” registers, he will have a profile at website.com/bob
I have looked at similar questions that say to solve the problem with .htaccess, but they don’t describe how this can be done.
You wouldn’t exactly need to generate a unique profile page upon registration. You can simply make a script like
profile.phpwhich takes a parameteruserto dynamically show the profile of a given user by accessing/profile.php?user=bob. Example:.htaccess comes into play when you want to rewrite the url
website.com/user/bobto point towebsite.com/profile.php?user=bobby using the following, for example.