Apache - manage third level domain

Discussion in 'Apache' started by Ennon10, Mar 5, 2010.

  1. #1
    Hi,
    I'm developing a web application in which users should get automatically a third level domain. I thought to edit configuration file to redirect all request to web server in a php page (ex index.php) in which checking the url requested.
    I wrote a rule that works correctly in all "second level examples" (ex. www.mysite.com/user1) but dont's seems work for third level domain (ex. user1.mydomain.com).

    can you suggest me an appropriate rule?

    Thank you in advance
     
    Ennon10, Mar 5, 2010 IP
  2. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #2
    In cPanel you can create a subdomain *.mydomain.com which will then get all the variations such as user1.mydomain.com, you then simply drop your script into the folder for the subdomain and use the request information given to PHP to decide which user/3rd level the request is for.
     
    tolra, Mar 7, 2010 IP