Hello All,
I am about to develop a site with multiple domains....
e.g.
service1.domainname.com
service2.domainname.com
service3.domainname.com
As all my config files are common across the site, how do I code this.
Can any one help me with tips and ideas of how to go about doing this.
Thanks in advance.
iBizConsultants
Any ideas for coding subdomains?
Moderator: General Moderators
-
ibizconsultants
- Forum Commoner
- Posts: 35
- Joined: Tue Sep 07, 2004 12:07 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
the actual server paths remain the same, so you can include the files fairly easily. The only things you have to consider are ones like cookies getting the right settings on the domain parameter, and links that are common. Commonly generated links (those generated by your core stuff) should be written to either use relative urls or $_SERVER['HTTP_HOST'].
-
ibizconsultants
- Forum Commoner
- Posts: 35
- Joined: Tue Sep 07, 2004 12:07 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
that all depends on your hosting configuration. Most hosts I've run into (that allow subdomains) automatically generate a subdirectory of the main publichtml folder matching that subdomain name. This means that the subdomain content can be accessed via domain.com/subdomain and subdomain.domain.com. When I run subdomains, having common files, I store the common files in some central area and use an absolute path to that folder for the first inclusion. The scripts contained in there are able to figure out where they are, and how they are being accessed, so they change to whatever they need to for each instance of calling.
-
ibizconsultants
- Forum Commoner
- Posts: 35
- Joined: Tue Sep 07, 2004 12:07 pm