Template in subdomains

I have 2 sites: site1.com and site1.com/site2. Each site has their own template.

The problem I am having is that randomly, the second site will switch to the template of the first site. I am guessing there is something I can do in the .htaccess file, but not sure exactly what. If anyone could point me in the right direction it would be greatly appreciated. Thanks

caredesign.net
Quote · 5 Sep 2013

it's probably something to do with your cookies. Likely the template value gets stored in there and when you browse to the other site on the same domain, it finds that value and uses it... Do you want both site to have that same template? I would remove it form the site you don't want, then the value won't match an installed template and change...

 

Perhaps... just a guess.

Quote · 5 Sep 2013

site1.com/site2 isn't a subdomain; that is a site within a site.

If your domain is mydomain.tld, then to have a sub domain on that domain it would be site2.mydomain.tld.  That might work better than your current setup or it may not.

The set up would be say /var/www/site1 and /var/www/site2 and your vhosts root for each one would be the same.  The root for mydomain.tld would be /var/www/site1 and the vhost for the sub domain site2.mydomain.tld root would be /var/www/site2.  In the header include file, you would set the URL for the first site as http://mydomain.tld and in the second site you would set it as http://site2.domain.tld.

Geeks, making the world a better place
Quote · 5 Sep 2013

thank you for your responses. Let me give more info for clarification. First off - We have already purchased a license for site1.com. With your suggestion GG, that would require us to purchase a second license for site2.site1.com whereas we do not have to purchase another license for site1.com/site2. At this point financial reasons do not allow for us to do so. But maybe once we get more providers involved and start making money, then we can switch to your suggestion, GG. But thanks for the idea.

Now, Crack, there are 2 different templates - site1.com has a totally different template than site1.com/site2 and we need to keep both templates for their corrresponding sites. Based on your earlier thought regarding cookies - I looked and there is a cookie called skin. So I added the following to my header.inc.php file to set a cookie for site1.com/site2:

$mts = "mts";
setcookie("skin", $mts);

 

I am hoping this works because I have noticed one small thing, In Chrome and Firefox, I only see the one cookie for the mts skin, in opera, I see 2 cookies for the mts skin. I am hoping that the double cookies will not cause an issue.

 

Thank you both so much for your assistance.

caredesign.net
Quote · 5 Sep 2013

i think you should check with boonex about the licence because i would of thought that you would not need a second licence for a subdomain

Quote · 5 Sep 2013

thank you for your input Club, but I had already checked and unfortunately - subdomains need their own separate license. There are a bunch of posts already here in the forums in regards to how that sucks.

caredesign.net
Quote · 6 Sep 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.