If you want to use the same page name on both sites, you will have to display the "language" folder name in the URL (it's a setting in the web.config, I don't remember which one exactly).
Otherwize the system has no way of knowing which "/homepage" you want to see and it will take the first one in the tree.
Just out of curiosity: is there a reason why you would not want to use different page names? I think that from a SEO perspective, it might even be better to use localized names for the pages.
You are indeed right, I lost the fact that you were using different domaine names along the way. In that case it should indeed be able to differenciate the different pages, since you set the useDomainPrefixes setting to true.
What you can check is the link associated by Umbraco to each of the pages. You can see this on the page details, "general" property tab. If the link is the same for both pages (whatever the reason), then there will indeed be a problem to differenciate the two pages.
In that case I don't know if this is "by design" and I don't know if anybody else has a solution for this, but otherwize you might want to post the bug on coxdeplex.
So the config setting for useDomainPrefixes is doing its work, except that the language is not set.
Could it be because I use a different port (I use the built-in Visual Studio development server with port 50151)? The port is not refected in the Link to document setting in Umbraco.
Edit: I added the port to the hostname settings, but it still doesn't use the right language!
Looking in the trace, Umbraco just matches the first node on /test.aspx, it doesn't even take into account the hostname.
I have also doen the following:
Restart web server
Republish entire site
Publish site nodes and all subpages
By now I am confused about how this feature should work. Is it even supposed to do what I think it should do?
In my opinion, setting a hostname + language on a node should:
make all requests with that hostname match childnodes of that node
set the CurrentUiCulture for all requests with that hostname to the language set on that node
If it's not supposed to work like that then I don't really understand the feature. Before I log a work item, can you confirm that this is in fact what the feature should do?
After some more research I have found the behaviro utterly unpredictable: wrong are rendered for links, duplicate alternative links are generated, links are displayed in the CMS in an incorrect format...
Unable to get Umbraco to switch language based on hostname
Under the Content node I now have two nodes, with a unique name, and each with a unique hostname and for each hostname a different language:
site.com > hostname: site.com.local, language: en-US
site.nl > hostname: site.nl.local, language: nl-NL
Under each node I have created a page called Homepage. Here are the results when tracing each page in the browser:
site.com.local/Homepage.aspx > Culture changed to en-US
site.nl.local/Homepage.aspx > Culture changed to en-US
So from my perspective this feature is not working.
PS. I sincerely hope pages do not need to have unique names for each site...
Hello,
If you want to use the same page name on both sites, you will have to display the "language" folder name in the URL (it's a setting in the web.config, I don't remember which one exactly).
Otherwize the system has no way of knowing which "/homepage" you want to see and it will take the first one in the tree.
Just out of curiosity: is there a reason why you would not want to use different page names? I think that from a SEO perspective, it might even be better to use localized names for the pages.
Cheers,
Michael.
Of course, IF the page name can be localized and IF the localization results in unique names. From my experience this is not alway the case.
With regards to SEO, if we use different hostnames then I don't see a problem when some URLs in both sites are the same.
About the setting in web.config, I have only set useDomainPrefixes to true. of course, when you say:
"Otherwize the system has no way of knowing which "/homepage" you want to see and it will take the first one in the tree."
That's not true, the system should look at the hostname and find the right page in the tree.
Hi Michiel,
You are indeed right, I lost the fact that you were using different domaine names along the way. In that case it should indeed be able to differenciate the different pages, since you set the useDomainPrefixes setting to true.
What you can check is the link associated by Umbraco to each of the pages. You can see this on the page details, "general" property tab. If the link is the same for both pages (whatever the reason), then there will indeed be a problem to differenciate the two pages.
In that case I don't know if this is "by design" and I don't know if anybody else has a solution for this, but otherwize you might want to post the bug on coxdeplex.
Cheers,
Michael.
The link for each pages looks like this:
http://site.com.local/test.aspx
http://site.nl.local/test.aspx ;
So the config setting for useDomainPrefixes is doing its work, except that the language is not set.
Could it be because I use a different port (I use the built-in Visual Studio development server with port 50151)? The port is not refected in the Link to document setting in Umbraco.
Edit: I added the port to the hostname settings, but it still doesn't use the right language!
Mmmh, I'm afraid I can't help much further on this. You might have a look at the following forum post referring to a similar problem: http://our.umbraco.org/forum/ourumb-dev-forum/bugs/7333-Child-page-with-the-same-name-as-homepage-node-routes-to-homepage?p=0
Maybe you can get an idea out of there to help you solve yourissue. In any case, I think this could be put as a bug on codeplex.
Cheers,
Michael.
Looking in the trace, Umbraco just matches the first node on /test.aspx, it doesn't even take into account the hostname.
I have also doen the following:
By now I am confused about how this feature should work. Is it even supposed to do what I think it should do?
In my opinion, setting a hostname + language on a node should:
If it's not supposed to work like that then I don't really understand the feature. Before I log a work item, can you confirm that this is in fact what the feature should do?
Thanks for your help!
After some more research I have found the behaviro utterly unpredictable: wrong are rendered for links, duplicate alternative links are generated, links are displayed in the CMS in an incorrect format...
:-(
is working on a reply...