How do websites like facebook and formspring dynamically make subdirectory links for their new users?
for example, if i sign up on formspring and my username is USA1992, the link to my profile is formspring.me/USA1992
how do websites do that?
dynamic link creation
Moderator: General Moderators
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: dynamic link creation
You need to use url rewriting to map (for example) "http://example.com/bob123" to "http://example.com/user.php?user=bob123". Then you can use $_GET['user'] in user.php to bring up that user's profile.
http://www.google.com/search?q=php+url+ ... g+tutorial
http://www.google.com/search?q=php+url+ ... g+tutorial
-
Peter Kelly
- Forum Contributor
- Posts: 143
- Joined: Fri Jan 14, 2011 5:33 pm
- Location: England
- Contact:
Re: dynamic link creation
Use Mod_Rewrite have a look at http://www.easymodrewrite.com for guidance