Copied to clipboard

Flag this post as spam?

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


  • Peter Alcock 113 posts 176 karma points
    Dec 15, 2011 @ 17:42
    Peter Alcock
    0

    URL Shortening

    Hi all,

    hopefully a nice easy thing that i am missing! I need to shorten up my URLS, currently they are displaying the url including child nodes (if thats the right defineition!) i.e. www.testsite.com/anotherpage/newpage

    I want to make it so the 'newpage' will always display as www.testsite.com/newpage can someone point me in the right direction?

    Thanks

     

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 16, 2011 @ 11:33
    Jeroen Breuer
    0

    Well the easiest solution is to move the node from the "anotherpage" parent to the parent of that node. The url structure is based on where the node is in the tree so moving it can change it. 

    You can also use url rewriting for this. Something like this will do in the UrlRewriting.config file: 

    <add name="newpage"
               virtualUrl="^~/newpage"
               destinationUrl="~/anotherpage/newpage"/>

    Jeroen

  • Peter Alcock 113 posts 176 karma points
    Dec 16, 2011 @ 11:45
    Peter Alcock
    0

    Hi Jereon,

    Thanks for the reply, moving the node as much as i would like to wouldnt be an option as the structure needs to stay the same, the urlrewriting would work however the site has a large amount of links and more to be added on a constant basis, is there no rule that can be applied to strip down the url to always be something like www.domain.com/currentpagenode?

    Cheers

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 16, 2011 @ 11:50
    Jeroen Breuer
    0

    You can try the umbracoUrlAlias, but I don't know if that also works for creating shorter url's.

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft