Hi! I have a dilemma with urls created by Umbraco. Any ideas are welcome!
I have this structure where the root node is at level 2
-------------
content (level 0)
> domain.com
> > my-site-content [root node set by manage hostnames]
> > > home [redirects to root node]
> > > et cetera
--------------
For some reason umbraco seems to not like having a node at level 2 as root node, when I look in properties for that page I see:
Link to document : /my-site-content
Both urls www.mydomain.com and www.mydomain.com/my-site-content works fine.
My problem is that from the "home"-page I do a umbracoRedirect to the root node, and it goes to the www.mydomain.com/my-site-content -address instead of www.mydomain.com/.
How can I force it to go to www.mydomain.com instead?
Greatly thankful for any input on this! Open for workarounds also, internal redirects, server transfers, anything ... :-)
The best idea I have now is to use umbracoUrlName. When I set that to "something" the startpage gets the url www.mydomain.com/something which is not better than www.mydomain.com/my-site-content, however - if I could set the umbracoUrlName to [empty] it would perhaps work out fine. Problem is when it's empty it's not used as a replacement for the original url...
Ok, here's a serious hackish workaround... Don't tell anyone...
I put a backslash as a umbracoUrlName. When I do that my umbracoRedirect to the root gives me the nice url www.mydomain.com/
However - all niceUrl's inlcudes the \ so that my address'es are presented like www.mydomain.com/\/et cetera - to handle that I added a xslt extension niceUrlHack which simply removes /\ from umbraco.library.niceUrl.
Yes it's very ugly (in code), but it works as a work-around for now.
This was a bad hack. Now I re-arranged the folders in umbraco to my sites starts directly under Content. Works perfect. Seems to be only the way. Did I miss some doc about sites should not be on any other level than 0 or 1?
Root node and redirects
Hi! I have a dilemma with urls created by Umbraco. Any ideas are welcome!
I have this structure where the root node is at level 2
-------------
content (level 0)
> domain.com
> > my-site-content [root node set by manage hostnames]
> > > home [redirects to root node]
> > > et cetera
--------------
For some reason umbraco seems to not like having a node at level 2 as root node, when I look in properties for that page I see:
Link to document : /my-site-content
Both urls www.mydomain.com and www.mydomain.com/my-site-content works fine.
My problem is that from the "home"-page I do a umbracoRedirect to the root node, and it goes to the www.mydomain.com/my-site-content -address instead of www.mydomain.com/.
How can I force it to go to www.mydomain.com instead?
Greatly thankful for any input on this! Open for workarounds also, internal redirects, server transfers, anything ... :-)
The best idea I have now is to use umbracoUrlName. When I set that to "something" the startpage gets the url www.mydomain.com/something which is not better than www.mydomain.com/my-site-content, however - if I could set the umbracoUrlName to [empty] it would perhaps work out fine. Problem is when it's empty it's not used as a replacement for the original url...
Ok, here's a serious hackish workaround... Don't tell anyone...
I put a backslash as a umbracoUrlName. When I do that my umbracoRedirect to the root gives me the nice url www.mydomain.com/
However - all niceUrl's inlcudes the \ so that my address'es are presented like www.mydomain.com/\/et cetera - to handle that I added a xslt extension niceUrlHack which simply removes /\ from umbraco.library.niceUrl.
Yes it's very ugly (in code), but it works as a work-around for now.
This was a bad hack. Now I re-arranged the folders in umbraco to my sites starts directly under Content. Works perfect. Seems to be only the way. Did I miss some doc about sites should not be on any other level than 0 or 1?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.