Subdomain directory accessible from domain.com/subdomain too?

Brook

Well-Known Member
Apr 22, 2005
99
0
156
If I create a subdomain such as:

subdomain.domain.com

How can I stop the directory:

domain.com/subdomain

showing the contents of the subdomain too? Is there anyway I can create a redirect so that anyone going to the /folder always gets redirected to the subdomain?

Had a search but couldn't find anything.

Cheers,

Edit: The subdomains don't work properly here either, eg:

If you go to this threads page by changing the subdomain to a folder:

http://forums.cpanel.net/showthread.php?t=74981

to

http://cpanel.net/forums/showthread.php?t=74981

You get some wierd stuff happening!!
 
Last edited:

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Why not set the base directory of the subdomain to something other than ~/public_html/subdomain? If you are using X3 (highly recommended) you should be able to do this while creating the subdomain.