SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    URL creation? I don't know what it's called, help me find a name so I can look it up!

    I would love to google my question, but I don't know how this is called....

    I want to create URLs for each user of a site with this format:

    www.mysite.com/user1

    Facebook does this, for example. In a static page I'd do it with a folder and index file for each user, but that's not practical if you have too many users. Could you explain how this is done or at least how it is called so I can find myself something to read?

    Thanks!!!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,301
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    How is your site constructed? Is it static, or does it use a CMS, or are you trying to build something in PHP yourself to automate this. How do users get registered etc? Will you do it, or do they sign up and get the URL automatically?

  3. #3
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    You'd use Apache's mod_rewrite in tandem with a PHP script.

    Search for rewrite urls PHP, or mod_rewrite.

  4. #4
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks both of you for your answers. Mod_rewrite is exactly what I'm looking for :-)


Bookmarks

Posting Permissions

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