Pointing a domain at a subdomain

Discussion in 'Site & Server Administration' started by Jmz, Oct 26, 2008.

  1. #1
    Sorry if this is in the wrong section, I wasn't sure where would be best.

    I have a site which does a similar thing to wordpress.com. A user can sign up and they get a sort of mini site that is hosted in the subdomain username.mysite.com

    I want to add the ability for users to be able to add their own domain (like on wordpress.com) so they theirsite.com would point at username.mysite.com

    It would also be good if going to theirdomain.com/page.html would be the same as username.mysite.com/page.html too.
     
    Jmz, Oct 26, 2008 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    Do u have access to the server ull have to do such that if someone ads a domain its added to virtual host of apache ... How do u do it for subdomains ??
     
    Bohra, Oct 26, 2008 IP
  3. Jmz

    Jmz Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have a VPS so I have access to pretty much everything.

    With the sub domain, I set up the wildcard subdomain thing in Apache and used mod_rewrite so that username.mysite.com shows mysite.com/user/index.php?user=username
     
    Jmz, Oct 26, 2008 IP