According to the Wiki: "Use this (NiceURL) to return a 'Friendly URL' for a given node in the Umbraco content section. A 'Friendly URL' is the complete encoded URL excluding the domain."
However... if you are using Hostnames, you instead get the entire URL WITH the domain name.
Is this a bug or by design? as it causes some of my code and packages to break.
In the umbracoSettings.Config you need to change the setting <useDomainPrefixes> to false. This will enables you to work with relative paths. If you are running in a multidomain scenario, it won't work, you have to use the <useDomainPrefixes> with true.
Yeah one of those annoying things ... that makes thing more complex than it should be ! take makes umbraco not as user friendly as it could be ! Certainly if no answers are given to any problem :-)
NiceURL and Hostnames - bug or by design?
According to the Wiki: "Use this (NiceURL) to return a 'Friendly URL' for a given node in the Umbraco content section. A 'Friendly URL' is the complete encoded URL excluding the domain."
However... if you are using Hostnames, you instead get the entire URL WITH the domain name.
Is this a bug or by design? as it causes some of my code and packages to break.
In the umbracoSettings.Config you need to change the setting <useDomainPrefixes> to false. This will enables you to work with relative paths. If you are running in a multidomain scenario, it won't work, you have to use the <useDomainPrefixes> with true.
So this is by design and there is a "bug" in the Wiki description of NiceURL?
Yeah one of those annoying things ... that makes thing more complex than it should be ! take makes umbraco not as user friendly as it could be ! Certainly if no answers are given to any problem :-)
I corrected the "bug" in the wiki description of NiceUrl and added a note concerning the impact of useDomainPrefixes: http://our.umbraco.org/wiki/reference/umbracolibrary/niceurl
is working on a reply...