dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: How to build a about.me like website?

  1. #1
    Join Date
    Nov 2011
    Posts
    1

    How to build a about.me like website?

    say a user register a user name as jason, then his website will be xxx.com/jason how to establish this function? need your help!! thank you!

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,634
    It's often done with URL redirection (e.g. via ModRewrite in Apache) so that "jason" becomes a GET variable that is used to query the DB via the default script to populate its data from the DB.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Mar 2010
    Posts
    672
    Yep, NogDog is exactly right.

    Essentially

    example.com/jason

    would be converted to (via rewrite) something like:

    example.com/userpage.php?name=jason

    Which in turn would be referenced in a table that relates the name to an id like:

    jess, 1
    jason, 2

    thus from this point on you'd refer to userid 2, and lookup your data that way. Only thing to be careful about is you have to make sure each username is 100% unique.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles