Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dwayne A 97 posts 117 karma points
    Mar 28, 2011 @ 15:27
    Dwayne A
    0

    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?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 28, 2011 @ 17:13
    Jan Skovgaard
    0

    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

  • Dwayne A 97 posts 117 karma points
    Mar 29, 2011 @ 09:02
    Dwayne A
    0

    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?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 29, 2011 @ 23:08
    Jan Skovgaard
    0

    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

  • Dwayne A 97 posts 117 karma points
    Apr 01, 2011 @ 08:43
    Dwayne A
    0

    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?

  • Daniel Bardi 927 posts 2562 karma points
    Apr 01, 2011 @ 08:49
    Daniel Bardi
    0

    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.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 01, 2011 @ 08:53
    Jan Skovgaard
    0

    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

     

  • Dwayne A 97 posts 117 karma points
    Apr 01, 2011 @ 09:04
    Dwayne A
    0

    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?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 01, 2011 @ 09:10
    Jan Skovgaard
    1

    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

  • Dwayne A 97 posts 117 karma points
    Apr 01, 2011 @ 09:19
    Dwayne A
    0

    Yep, got it. Thanks for the help. I'll give it a whirl.

Please Sign in or register to post replies

Write your reply to:

Draft