PDA

View Full Version : Simple Subdomain + Second Domain


johnner
10-11-05, 12:03 AM
I have a number of subdomains on my site using the simple method (subfolders w/ the subdomain name containing their own htdocs folders). I also have a second domain hosted on my account that uses a .htaccess file to point it to the right subfolder. My question is, is there also a simple method of hosting the second domain without using the .htaccess file?

-Johnner

www.johnner.com
techblog.johnner.com
www.skatemagnolia.com

NEWUSER
10-11-05, 01:49 AM
I have the same setup and its based on .htaccess file. I know with subdomains you no longer need the .htaccess file for that, but for domains i think you do.

IanS
10-11-05, 03:53 AM
I have a number of subdomains on my site using the simple method (subfolders w/ the subdomain name containing their own htdocs folders). I also have a second domain hosted on my account that uses a .htaccess file to point it to the right subfolder. My question is, is there also a simple method of hosting the second domain without using the .htaccess file?

-Johnner

www.johnner.com
techblog.johnner.com
www.skatemagnolia.comIt's not something that has been described here, so I'd doubt if it is possible.

It is however very easy to do an .htaccess file for the second domain - install extras' "domain manager" as it does everything you will need in the way of re-direction.

RTH10260
10-11-05, 09:04 AM
I know with subdomains you no longer need the .htaccess file for that, but for domains i think you do.Correct about the domains, but inaccurate about subdomains.

Powweb seems always to have had their EasySubdomain setup with totally separated filesystem paths. What's new is that they are supported in OPS/Sitetools. Subdomains act as truly independant 'hosts', eg websites. They have their own /cgi-bin/ directory and for php, they can have a custom php.ini file that is different from that of the main host (www). As this type of host is independant, the webserver cannot share content from other subdomains (including the main), though there is a trick at operating system level and the filesystem by adding symlinks.

Using htaccess to separate websites within the main website directory tree allows for easy sharing of content if that is intended. The /cgi-bin/ is shared among subdomains and websites established for pointer domains. For PHP, the php.ini is used for all websites that are placed into the same /htdocs, possibly a drawback.