We have that very same setup on that site for example -- so it is possible.
Hostnames are set to www.example.com/en and www.example.com/fr. Having a hostname set to www.example.com may be the cause of the issue, because Umbraco will get that one and then look for a /en page into it -- which does not exist. So you may want to try to set the hostname of the NO version to www.panoramahotell.no/no.
Then, you'll need some sort of handler to redirect visitors from www.example.com to either /en or /no based upon... whatever you want... we do it with some ip-based geolocalisation + browser language...
Alternatively, do leave the hostname to www.example.com/no + add a rewrite rule to add /no to urls that do not start with /en + add a tweak to Umbraco to remove /no from urls when generating them. We have that in production too. Not sure if the "tweak" is possible on the public Umbraco versions, though. I can dig for it if you're interested.
Interesting... are you saying this is enough to get your setup to work? Ie set both with and without /no on the main node? Would both /no/selskap and /selskap urls work, then?
Unfortunately the setup I described above relies on a patch to Umbraco's core, that we haven't commited yet. I have not idea if it will make it into 4.7.1. Which brings you back to the other, "crude", solution.
We would be very intested too to use such structure with folders instead of subdomains. Any news regarding commit of this patch to the core. What would be the crude solution to achieve this ?
Multilingual site using "folders" instead of subdomains
How can I achieve url's like this in a multilingual site:
www.panoramahotell.no/home (main version)
www.panoramahotell.no/en/home (english version)
My site structure is like this:
The hostname for the english site is like this:
(The norwegian/main one is the same, just with without "/en")
Umbraco is set up with domain prefixes and stuff, and it seems the english home page has the correct url:
When I try to browse to that url however, I get a 404 error.
Have anyone successfully implemented this kind of multilingual setup?
We have that very same setup on that site for example -- so it is possible.
Hostnames are set to www.example.com/en and www.example.com/fr. Having a hostname set to www.example.com may be the cause of the issue, because Umbraco will get that one and then look for a /en page into it -- which does not exist. So you may want to try to set the hostname of the NO version to www.panoramahotell.no/no.
Then, you'll need some sort of handler to redirect visitors from www.example.com to either /en or /no based upon... whatever you want... we do it with some ip-based geolocalisation + browser language...
Yes, that should work. I was however looking for a less "crude" implementation.
Will implement this if no other solution arises though :-)
Alternatively, do leave the hostname to www.example.com/no + add a rewrite rule to add /no to urls that do not start with /en + add a tweak to Umbraco to remove /no from urls when generating them. We have that in production too. Not sure if the "tweak" is possible on the public Umbraco versions, though. I can dig for it if you're interested.
The end result should be what you're looking for.
If anyones interested, here are the hostnames for the main (norwegian) node:
Interesting... are you saying this is enough to get your setup to work? Ie set both with and without /no on the main node? Would both /no/selskap and /selskap urls work, then?
No. The setup I have displayed above does not work.
Unfortunately the setup I described above relies on a patch to Umbraco's core, that we haven't commited yet. I have not idea if it will make it into 4.7.1. Which brings you back to the other, "crude", solution.
We would be very intested too to use such structure with folders instead of subdomains. Any news regarding commit of this patch to the core. What would be the crude solution to achieve this ?
Thanks
Gilles
is working on a reply...