The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

subdomain directory location

Discussion in 'General Discussion' started by mwhitby, Oct 7, 2003.

  1. mwhitby

    mwhitby Registered

    Joined:
    Oct 4, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    hey all, i have a subdomain called test, which as you probably know is created by default in the /public_html/ directory, i wish for the subdomain to be created below that directory, so it is on a par with public_html, if you get what i mean?

    so www.mydomain.com would point to /home/public_html/
    and test.mydomain.com would point to /home/test/

    is that possible? the only reason i want to is because it is a bit annoying, as $_SERVER['DOCUMENT_ROOT'] is used in my php scripts, and it messes it up because a user could access my subdomain by www.mydomain.com/test/, making the doc root /public_html/, not /public_html/test/

    alternatively, is there any way in .htaccess files to restrict access to the /public_html/test/ dir by the URI used? as in:

    allow access only if domain = test.mydomain.com

    if that makes sense? i checked apaches directives section but didnt find anything that would satisfy my needs.

    thanks!

    cPanel.net Support Ticket Number:
     
  2. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    There is no way to do that. however, you can go into whm and go to create accounts, and then create the subdomain test.yourdomain.com and assign it a unique user name and password. This will give it its own directory, its own mailings, completely seperate from everything else, however, you can still get to it from yourdomain.com yourdomain.com/test or test.yourdomain.com. Does that make sense?

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page