SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist
    Join Date
    Dec 2005
    Posts
    527
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    virtcual subdomain

    Hello

    How can convert users that comes in :

    Code:
    http://www.userid.mysite.com
    
    or 
    
    http://userid.mysite.com
    to this page :


    Code:
    http://www.mysite.com?userid=userid
    I dont want users see this url :
    http://www.mysite.com?userid=userid

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Are you on a shared hosting environment?
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Enthusiast GhostGambler's Avatar
    Join Date
    Apr 2007
    Location
    Germany, NRW
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just use one of the values of $_SERVER (one of those contains the host name the browser requested, sth. like host_name I think) and use an if statement+redirect in a global file

  4. #4
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by GhostGambler View Post
    Just use one of the values of $_SERVER (one of those contains the host name the browser requested, sth. like host_name I think) and use an if statement+redirect in a global file
    There is more to it then just using $_SERVER['HTTP_HOST'] one must setup a wildcard DNS rule and set up Apache's VHOST settings correctly.

    The chance of doing this on a shared hosting environment...zero.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  5. #5
    SitePoint Evangelist
    Join Date
    Dec 2005
    Posts
    527
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have now a shared server but I can use a persolan server

    I want create a subdomain automatically for each user that registerd in my site


    I have this patametes in my WHM panel are these usefull ?

    Add a DNS Zone
    Delete a DNS Zone
    Edit DNS Zone
    Edit MX Entry
    Edit Zone Templates
    Park a Domain
    Last edited by bakhanbeigi; Jun 28, 2007 at 13:00.

  6. #6
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Adding an own entry for each subdomain would make configs large and slow to parse.

    Make it so that all subdomain handling is done on the script side

  7. #7
    SitePoint Evangelist
    Join Date
    Dec 2005
    Posts
    527
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I need some helps about server changing

    like some things that you said

    How can I creat a wildcard DNS rule and set up Apache's VHOST ?

    I have CPanel + WHM and if need I can SSH


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
  •