I've created multisites on a single install. To avoid using redirects, I've moved my start pages to the top site node of each site. Now when using "/" to link to the start page of each site, the URL points to the top content node i.e. the start page of the first site in the hierarchy.
How can I create links dynamically in my template or xslt file so they point to the top node of each site?
Have you setup "manage hostnames" on the top nodes in Umbraco? And have you configured your IIS as well?
By setting up the hostname in Umbraco you should be able to use "/" and make the link return to the correct top node instead of just the one that is the first in the hierachy.
Yes, I have set the host names. However, at the moment we are running in development mode and not actually running off seperate domains for each site. They all run off the same ip address with the protocol ipaddress/folder/file.aspx. Does this make a difference? Will Umbraco interpret the node structure differently once all the sites are live and running on their own domains?
Then setup IIS and Umbraco and then you should be able to get the correct links - otherwise Umbraco will asume it's always the first top level site that it should look at.
Yes and no. I get you, but not sure we have the same config. In my case I am running on a server and all sites in the install are using the same IP address. It appears you are running a unique IP for each site, correct? There was no problem until the first site went live. Coincidentallly it is the first site in the root/content node, and after changing the host name on that site-root node and pointing ISS at it with a domain name all the links break; they now redirect to that domain instead prefix.
The example I provided is from my local setup. So they're running from the same machine
But in the IIS create three sites that is mapped to the same Umbraco folder. In the "manage hostnames" setup the sites accordingly and then it should work.
useDomainPrefixes is set to true. Is that not the default? So if I understand correctly, I give each site root a host name, create each site in ISS and point at the given host name for these root nodes. Is that the gist?
If you call the sites site1.com,site2.com and site3.com in IIS then you need name it the same in the "manage hostnames" part for each site - does it make sense? :-)
link to site nodes on mulitsite
Hi,
I've created multisites on a single install. To avoid using redirects, I've moved my start pages to the top site node of each site. Now when using "/" to link to the start page of each site, the URL points to the top content node i.e. the start page of the first site in the hierarchy.
How can I create links dynamically in my template or xslt file so they point to the top node of each site?
Hi Dwayne
Have you setup "manage hostnames" on the top nodes in Umbraco? And have you configured your IIS as well?
By setting up the hostname in Umbraco you should be able to use "/" and make the link return to the correct top node instead of just the one that is the first in the hierachy.
/Jan
Hi Jan,
Yes, I have set the host names. However, at the moment we are running in development mode and not actually running off seperate domains for each site. They all run off the same ip address with the protocol ipaddress/folder/file.aspx. Does this make a difference? Will Umbraco interpret the node structure differently once all the sites are live and running on their own domains?
Hi Dwayne
When I'm developin multiple sites on my local machine I always setup the sites in IIS and in "Manage hostnames" in Umbraco.
You need to add these sites by adding this to your hosts file.
127.0.0.1 site1.local
127.0.0.2 site1.local
127.0.0.3 site1.local
Then setup IIS and Umbraco and then you should be able to get the correct links - otherwise Umbraco will asume it's always the first top level site that it should look at.
Hope this makes sense?
/Jan
Hey Jan,
Yes and no. I get you, but not sure we have the same config. In my case I am running on a server and all sites in the install are using the same IP address. It appears you are running a unique IP for each site, correct? There was no problem until the first site went live. Coincidentallly it is the first site in the root/content node, and after changing the host name on that site-root node and pointing ISS at it with a domain name all the links break; they now redirect to that domain instead prefix.
How would I set up my ISS to deal with this?
if your using a multi site setup I'd recommend setting <useDomainPrefixes> to true in the umbracoSettings.config.
This will let "/" direct to the top node.
Hi Dwayne
Try what Daniel is saying above.
The example I provided is from my local setup. So they're running from the same machine
But in the IIS create three sites that is mapped to the same Umbraco folder. In the "manage hostnames" setup the sites accordingly and then it should work.
/Jan
useDomainPrefixes is set to true. Is that not the default? So if I understand correctly, I give each site root a host name, create each site in ISS and point at the given host name for these root nodes. Is that the gist?
Hi Dwayne
That's correct.
If you call the sites site1.com,site2.com and site3.com in IIS then you need name it the same in the "manage hostnames" part for each site - does it make sense? :-)
/Jan
Yep, got it. Thanks for the help. I'll give it a whirl.
is working on a reply...