Creating user accounts as sub directories I'm STUMPED

Discussion in 'PHP' started by gehin08, Aug 18, 2009.

  1. #1
    Hey all, so to the point I am trying to add a user blog registration on my site and I would like the URLS to be as a subdirectory I tried searching for domain mapping or mod_rewrite and I am coming up empty handed.. Right now the URL looks like this: blahblah.com/blog.php?id=YOURBLOG
    I would like it to be http://YOURBLOG.blahblah.com

    Any solutions, good tutorials any of you know of?
     
    gehin08, Aug 18, 2009 IP
  2. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #2
    mod_rewrite is the way to go. You will need to store the subdom names in a database so that it is only unique. Rewrite the http://sub.domain.com URL using mod_rewrite and redirect to the desired page.

    you wont be able to create subdirectories because of php restriction.
     
    olddocks, Aug 18, 2009 IP
  3. gehin08

    gehin08 Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ok thanks, i will see if i can work a mod_rewrite out and use the "subdirectory" as the username for now :D
     
    gehin08, Aug 18, 2009 IP