Copied to clipboard

Flag this post as spam?

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


  • Olly Berry 47 posts 68 karma points
    Dec 10, 2009 @ 12:44
    Olly Berry
    0

    URL without directory name possible?

    Hello,

    I have an issue with the urls for a site - I'm not sure if this is possible, but I'll ask anyway...

    I'm trying to severely limit what the client will be able to do with the site, so I have created two "container" document types to hold the pages in the top menu navigation and bottom navigation.

    So the structure I have is:

    Content

     - Pages

        - Top Menu

            - Home

            - Another Page

            - etc.

        - Bottom Menu

            - Sitemap

            - Another Page

            - etc.

    All works nicely for my needs.

    What I would like to do is configure the URLs so that instead of seeing http://mydomain.com/top-menu/home and http://mydomain.com/bottom-menu/sitemap users just see http://mydomain.com/home and http://mydomain.com/sitemap

    Is there a way I can do this in Umbraco (I'm using 4.0.3 on IIS 6, Windows Server 2003 BTW)

    Many thanks in advance,

    Olly

  • Kristian Frost 18 posts 102 karma points
    Dec 10, 2009 @ 12:52
    Kristian Frost
    0

    An alternative would be to add a property in your Document Type, which defines wether it should be rendered as top or bottom. Then cut out the two menus in the structure. (ie. add a true/false property with the name "Show in bottom menu")

  • Olly Berry 47 posts 68 karma points
    Dec 10, 2009 @ 13:15
    Olly Berry
    0

    I had considered this Kristian and this was the way I did it initially, but I need the menus in the structure so that the client can easily differentiate the two visually.

    Thanks anyway!

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Dec 10, 2009 @ 13:23
    Sebastiaan Janssen
    0

    You can do this by using URL rewriting to replace "top-menu" and "bottom-menu". I'm not familiar with the url rewriting config, but search for it here or on Google, you should be able to fix this fairly easily.

  • Olly Berry 47 posts 68 karma points
    Dec 10, 2009 @ 13:59
    Olly Berry
    0

    Thanks sebastiaan, I'll look into that : )

  • Jannik Nilsson 38 posts 81 karma points
    Dec 10, 2009 @ 14:31
    Jannik Nilsson
    0

    What about the umbracoUrlAlias property?

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Dec 10, 2009 @ 18:11
    Dirk De Grave
    0

    Olly,

    umbracoUrlAlias is a good solution (see Jannik's post), umbracoUrlName is another alternative.

    umbracoUrlAlias provides a second url for the same page whereas umbracoUrlName changes your url permanently.

     

    Hope this helps.

    Regards,

    /Dirk

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Dec 10, 2009 @ 19:27
    Casey Neehouse
    0

    @Dirk,

    umbracoUrlName only changes the nodes' segment, not the entire path.  

    Using umbracoUrlAlias and hard coding the links is the only way to go without core modification or post processing.

  • Olly Berry 47 posts 68 karma points
    Dec 11, 2009 @ 11:02
    Olly Berry
    0

    Thanks very much guys : )

  • Stefan Kip 1606 posts 4098 karma points c-trib
    Dec 11, 2009 @ 11:51
    Stefan Kip
    0

    @Casey

    umbracoUrlName does change the entire path, so if a document has this url: "/about/company" you can enter "/company".

  • Stefan Kip 1606 posts 4098 karma points c-trib
    Dec 11, 2009 @ 15:24
    Stefan Kip
    0

    EDIT

    Oops... It does not change the entire path... :-/

    Sorry

  • 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