Root folder for subdomain

Status
Not open for further replies.

AndyH

New Member
Messages
9
Reaction score
0
Points
0
Hi,

When I create a subdomain, it defaults the document root to "(home)/public_html/subdomain". I can change the document root to a different directory within public_html, but if I change it to a directory directly within my home directory it still puts it in public_html. Am I doing something wrong, or do all the subdomains have to map to a directory within public_html?

Rgds,
Andy
 

Twinkie

Banned
Messages
1,389
Reaction score
12
Points
0
Yes, since only content in the public_html folder is viewable, you can only have a sub domain within the public_html folder.
 
Last edited:

AndyH

New Member
Messages
9
Reaction score
0
Points
0
Ok, thanks.

So that means, if my main domain is:

mydomain.x10hosting.com

and I create a subdomain, then that will be accessible as either:

subdomain.mydomain.x10hosting.com
or
mydomain.x10hosting.com/subdomain

Is that right? Is there any way to stop it being accessed via that second option?

Rgds,
Andy
 

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
You can create a .htaccess redirect on mydomain.x10hosting.com/subdomain that redirects them to subdomain.mydomain.x10hosting.com
 
Status
Not open for further replies.
Top