Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonas Eriksson 930 posts 1825 karma points
    Aug 19, 2009 @ 10:12
    Jonas Eriksson
    0

    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 ... :-)

  • Jonas Eriksson 930 posts 1825 karma points
    Aug 19, 2009 @ 10:27
    Jonas Eriksson
    0

    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...

  • Jonas Eriksson 930 posts 1825 karma points
    Aug 19, 2009 @ 10:47
    Jonas Eriksson
    0

    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.

  • Jonas Eriksson 930 posts 1825 karma points
    Sep 04, 2009 @ 14:40
    Jonas Eriksson
    0

    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?

  • 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.

Please Sign in or register to post replies