subdomain and directory question

Posted by azn_romeo_4u, 03-27-2008, 01:02 AM
How do those websites do a website like this. http://forums.site.com But when you go to http://site.com/forum It's not there. O_o Cuz you know how when you create subdomains in cpanel, it will create a folder for you? I wanted to do it where, http://forums.site.com doesn't rely on that folder, but acts more like a public_html directory. Just wondering how some sites did that?

Posted by domainworldaccess, 03-27-2008, 01:08 AM
In WHM/cPanel simply create the subdomain as a separate account and it will not be present in the web root of the tld - this presumes you have at leastt reseller WHM access. Good luck, Joe

Posted by azn_romeo_4u, 03-27-2008, 01:32 AM
Sorry it doesn't have reseller abilties. How would I do it via tld.

Posted by Tim Greer, 03-27-2008, 02:52 AM
You can't edit it manually as you're not root and if you're not a reseller, you might have to ask your host to do this for you. Do you want it to literally be the public_html web root, or just similar? If you only want it to be similar in the structure, you can remove and re-add it to use a different web root, or point it to the main public_html web root if you want the site to default to it. There are several ways, but as a regular user via Cpanel, you might need to ask for help unless the above will work for you.

Posted by domainworldaccess, 03-27-2008, 03:18 AM
From public_html create a folder called subdomains or something else you like. Create the subdomains within that folder rather than inside the public_html folder... so instead of /home/username/public_html/subdomain1 you have /home/username/public_html/subdomains/subdomain1 You will have to enter the path you want in the subdomain creation dialogue box within cPanel. Ideally, upgrade to a reseller account giving you control over the users and home directories, particularly if there is ever a chance that any of the domains or subdomains would need to be moved to another server without any of the other domains or subdomains. Good luck, Joe

Posted by Oceanworld, 03-27-2008, 03:56 AM
Maybe these sites are not under Cpanel

Posted by 1boss1, 03-30-2008, 12:30 AM
You use Mod_Rewrite to do that. You can even create virtual sub domains on the fly so when your members register they get their own fred.domain.com sub domain. I do that with one of my forums blog system.

Posted by Tim Greer, 03-30-2008, 02:23 AM
rewrite could work with a wild card domain, but I didn't get the impression that's what they had or wanted. I may be mistaken.

Posted by 1boss1, 03-30-2008, 03:01 AM
You dont "need" wildcare subdomain to put your forum files in your domain root and rewrite it to forum.domain.com as this can be achieved by manually creating the subdomain and using regular rewrite from root to that subdomain. This will achieve the exact effect he is looking for, i just mentioned the wildcard in case he wanted to give member pages like profiles, blogs etc their own subdomains also. I personally wouldnt do what the op wants, instead i would create the forum subdomain and install my files in /forum like normal then 301 my domain.com/forum URL to forum.domain.com so the forum cant be accessed using the alternate subfolder URL. This way the root folder is kept completely empty to develop a portal or site on domain.com

Posted by Tim Greer, 03-30-2008, 02:24 PM
Right, I was stating the wild card setting would be needed to create sub domains on the fly, in response to your mention of it. Of course they'd not need to have wild cards for a single sub domain. And, of course, they don't need to use rewrite at all either -- but it is one of several ways to go about this.

Posted by Rageki-John, 03-30-2008, 03:49 PM
I might be wrong but I think you've made a minor typo. Have you tried http://www.site.com/forums. Since the subdomain must be under the folder forums .

Esta resposta foi útil?

 Imprimir este Artigo

Leia também

How can I fix this?

Posted by TylerH, 09-18-2008, 06:06 AMFor some reason my sendmail is not working and I tired...

Apache not recognising my .php files.

Posted by SuperSub, 06-29-2008, 06:43 AMHey guys, Yesterday I was told by my hosting provider...

Loading proress bar before iframe

Posted by bambinou, 11-16-2012, 11:39 AMHello, I have an hotel booking affiliate iframe that...

SSL Certificate works for folders?

Posted by Energizer Bunny, 01-13-2008, 06:10 AMHi, Say i have domain zzzzz.com and have some...

Problem with "." in Windows 2003 Folder

Posted by boonchuan, 06-28-2008, 07:45 AMI had a folder abc.xyz in Windows 2000 server and it had...