I'm building a multilingual website using Umbraco 8 and I'm stuck on getting our local development URL's working properly. The URL's on my website are pointing to the full URL instead of the relative path. So this is what happens:
I believe that the umbracoDomain table in the database should be able to get you unstuck. Just replace www.example.com with localhost and you might be good to go.
Thanks! Changing something in the database isn't really my cup of tea as a front-end developer, but might consult someone who knows more about it. I was hoping for a nice way to make it work through settings or something, guess it's not possible.
Within the root node of your site - or wherever is applicable - if you right-click it to bring up the properties and click into Culture and Hostnames, you should be able to add or remove domain names.
So, there shouldn't be any need to access the database - as this can be handled via the front-end.
I've attached an example image below to give a rough idea of what I mean.
Alternatively, if you remove all of the domains it will always use your default locahost.
Thanks, this seems a step in the right direction! I now have my local environment working, but Umbraco doesn't seem to understand which language to choose when using two languages.
I have included a language selector in my template which lets the user navigate to another language. The language it is referring to is not the right one. How do I make sure that Umbraco picks the right domain when I'm either working local or on production? It seems like it picks one randomly or the first on in the list.
When working locally, there's two options that I use (that don't require editing any code):
Remove all of my "example" domains so there's only ever 1 domain per language. On my live site, it's usually not too time consuming to switch these back.
Keep all of my domains and simply test things out by accessing document types by clicking one of the appropriate URLs under the "Info" icon.
On local setups, you won't need the official domains and on live you won't need the local ones. So, I'd suggest the first option.
This is just what works for me though, so there's probably better ways to do this - but this would probably require some changes to the code itself.
Multilingual website relative URL's
Hi all!
I'm building a multilingual website using Umbraco 8 and I'm stuck on getting our local development URL's working properly. The URL's on my website are pointing to the full URL instead of the relative path. So this is what happens:
http://localhost/en-gb/about-us
Points to:
https://www.example.com/en-gb/about-us
I expect it to point to my local localhost URL instead of the full production URL. This makes navigating on my local environment very tedious.
Is there a way to make an exception to how the URL's are structured on my local environment? Or is there a best practice for this?
Many thanks!
I believe that the umbracoDomain table in the database should be able to get you unstuck. Just replace www.example.com with localhost and you might be good to go.
Thanks! Changing something in the database isn't really my cup of tea as a front-end developer, but might consult someone who knows more about it. I was hoping for a nice way to make it work through settings or something, guess it's not possible.
Thanks!
Within the root node of your site - or wherever is applicable - if you right-click it to bring up the properties and click into Culture and Hostnames, you should be able to add or remove domain names.
So, there shouldn't be any need to access the database - as this can be handled via the front-end.
I've attached an example image below to give a rough idea of what I mean.
Alternatively, if you remove all of the domains it will always use your default locahost.
Thanks, this seems a step in the right direction! I now have my local environment working, but Umbraco doesn't seem to understand which language to choose when using two languages.
I have included a language selector in my template which lets the user navigate to another language. The language it is referring to is not the right one. How do I make sure that Umbraco picks the right domain when I'm either working local or on production? It seems like it picks one randomly or the first on in the list.
When working locally, there's two options that I use (that don't require editing any code):
Remove all of my "example" domains so there's only ever 1 domain per language. On my live site, it's usually not too time consuming to switch these back.
Keep all of my domains and simply test things out by accessing document types by clicking one of the appropriate URLs under the "Info" icon.
On local setups, you won't need the official domains and on live you won't need the local ones. So, I'd suggest the first option.
This is just what works for me though, so there's probably better ways to do this - but this would probably require some changes to the code itself.
is working on a reply...