Copied to clipboard

Flag this post as spam?

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


  • ZNS 60 posts 195 karma points
    Apr 24, 2015 @ 12:06
    ZNS
    0

    How to structure this site?

    Hi,

    I need to solve how to structure a multi site within umbraco. What I need is the following addresses:

    www.domain.com/sv/ - Regional site
    www.domain.com/sv/subsite - Sub site 1
    www.domain.com/sv/subsite2 - Sub site 2

    However I'd like the following tree structure:

    -Root
    ---en
    ----Regional site
    ------content..
    ----Sub site 1
    ------content..
    ----Sub site 2
    ------content..

    As you see I'd prefer not to put all the sub sites beneath the regional site. But I'm having trouble configuring this. The language node doesn't have to where it is, I guess it could be beneath each site also.

  • ZNS 60 posts 195 karma points
    Apr 27, 2015 @ 11:37
    ZNS
    0

    No ideas on how to handle this?

  • ZNS 60 posts 195 karma points
    Apr 30, 2015 @ 16:45
    ZNS
    0

    Ok my idea is now to set this up as above but use url rewrite to move "/sv/regional" to "/sv". Are there any perfomance issues with doing a rewrite for a whole site like this?

  • Luke 110 posts 255 karma points
    May 02, 2015 @ 20:59
    Luke
    0

    Hiya,

    Maybe I miss-understanding but when I structure multi-sites using Umbraco I would have multiple root nodes and use the Culture and Hostnames settings.

    Regards, L

  • ZNS 60 posts 195 karma points
    May 03, 2015 @ 14:47
    ZNS
    0

    Thanks for replying. If this was a simple case of multiple sites with their own domain there wouldn't be an issue but this is a bit of a special case.

  • Chris Randle 61 posts 149 karma points c-trib
    May 03, 2015 @ 23:20
    Chris Randle
    0

    I second L's answer - unless you haven't described the problem fully, this can easily be resolved by right clicking on Root and selecting Culture and Hostnames. Then enter your first domain as domain.com/sv (exactly like that) under the default site language (en-GB for me). Once you've saved, you can see the property Link to document on the Properties tab will be domain.com/sv/subsite1 for the node you've called Sub site 1. So then - as long as nodes "Root", "en" and "subsite" don't have templates, you should begin your site with the home page for each "sub-site" as the "Sub site X" node.

    I find your diagram is a little unclear to me. You've called some nodes Content. This makes it confusing because Content is a section of Umbraco. It is not clear whether you want the home pages to be the "Sub site" nodes or the "Content" nodes. Regardless, whichever one you want, you just make sure their parents don't have templates, and set the C&H on which ever level you homepages exist at.

    This is a common scenario so there is a better solution such as Cultures and Hostnames, than URL rewriting which should always be a last resort since it will require a lot of maintenance as your site grows. Search engines don't always like 300 redirects on every page. There are many different ways to structure your content in Umbraco so we should be able to help you out. If all your home page nodes are at the same level, Cultures and Hostnames will see you right.

  • ZNS 60 posts 195 karma points
    May 04, 2015 @ 01:20
    ZNS
    0

    Thanks, I'll try to clarify a bit.

    I want these url:s
    www.domain.com/sv/ - Regional site
    www.domain.com/sv/localsite - Local site

    with the following structure. The main goal here is to avoid putting the "Localsite"-node beneath the "Regional site". I set the domain on ROOT to "http://www.domain.com" I set the domain on the "Regional site"-node to "http://www.domain.com/sv".

    -ROOT (this is a node with no template) - /
    ---SV (no template) - /sv/
    ----Regional site (start page template) - /sv/
    ------... (this is just to represent content beneath the site)
    ----Localsite (start page template) - /sv/localsite/
    ------...

    When I check link to document on the properties tab all urls look correct for both sites. www.domain.com/sv leads to the regional site which is correct. However www.domain.com/sv/localsite throws 404. I assume, since it's looking for a node beneath "Regional site" called "localsite".

  • Chris Randle 61 posts 149 karma points c-trib
    May 04, 2015 @ 02:15
    Chris Randle
    0

    Ok I understand now so thanks for clarifying :-) You haven't told it explicity, so you'll need to set the domain on the localsite node to www.domain.com/sv/localsite. Remember that this configuration is the first thing that Umbraco looks at when determining where to route your requests.

    Culture and Hostnames

    So set only the Culture and Hostnames for the following 2 nodes:

    • ROOT / SV / Regional site (www.domain.com/sv)
    • ROOT / SV / Local site (www.domain.com/sv/localsite)

    Sitemap

    Let us assume the same basic page sitemap for each site of

    • Home
    • Home / About us
    • Home / Products

    Then your sites will have the following URLs:

    Regional site

    • Home (http://www.domain.com/sv/)
    • About us (http://www.domain.com/sv/about-us)
    • Products (http://www.domain.com/sv/products)

    Local site

    • home (http://www.domain.com/sv/localsite/)
    • About us (http://www.domain.com/sv/localsite/about-us)
    • Products (http://www.domain.com/sv/localsite/products)

    Hopefully this is what you're after?

  • ZNS 60 posts 195 karma points
    May 04, 2015 @ 09:53
    ZNS
    0

    Yes, this is what I'm after. However it doesn't seem possible to enter "www.domain.com/sv/localsite" as a domain under cultures and hostnames. It's invalid. I think that it's not allowed to add a path except language.

  • Chris Randle 61 posts 149 karma points c-trib
    May 04, 2015 @ 10:10
    Chris Randle
    0

    You get a 404 error?

    I assume you have set up the routing? e.g. say by adding the domain www.domain.com/sv/localsite to your hosts file?

  • ZNS 60 posts 195 karma points
    May 04, 2015 @ 10:20
    ZNS
    0

    No. "www.domain.com/sv/localsite" or  "http://www.domain.com/sv/localsite" is not a valid value for a domain in Umbraco. It's not possible to enter it in the backoffice.

  • Chris Randle 61 posts 149 karma points c-trib
    May 04, 2015 @ 10:47
    Chris Randle
    0

    Ah yes - I get the same issue. Domains can only be 1 sub-page deep. Seems like an important feature than is missing there.

    Global URL redirects are the only solution as you originally mentioned for now, but as there seems to be other work going on in the C&H validator such as http://issues.umbraco.org/issue/U4-5929 and http://issues.umbraco.org/issue/U4-1186

    Sorry about not seeing the answer to this. Maybe stick with URL rewriting for now? :-(

Please Sign in or register to post replies

Write your reply to:

Draft