Copied to clipboard

Flag this post as spam?

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


  • Sean Dooley 273 posts 490 karma points
    Jan 20, 2016 @ 10:14
    Sean Dooley
    0

    URL shortener with same domain

    I'm looking into creating a shortened URL functionality as shown below

    One idea I have is to create redirect pages using umbracoRedirect. This would mean creating a separate redirect page for each page - not ideal.

    Another idea would be to generate a shortened URL when a node is first published and store it in a Document Type property the user couldn't edit. What I'm not sure of is how to hijack the route so that something like http://www.domain.com/9a8eed8c would work.

    Any other suggestions would be greatly appreciated.

  • Samira 113 posts 450 karma points
    Jan 20, 2016 @ 10:31
    Samira
    0

    Hi

    Please refer to the following link:

    https://our.umbraco.org/projects/developer-tools/routing/feedback/61218-Short-Urls

    hope this help

    Regards,

    Samira

  • Paul Seal 428 posts 2354 karma points MVP 3x c-trib
    Jan 21, 2016 @ 18:33
  • Sean Dooley 273 posts 490 karma points
    Jan 27, 2016 @ 10:10
    Sean Dooley
    0

    Thanks for the input Paul, I was hoping to hijack the route rather then create lots of redirect pages.

    This would be a good fallback idea though.

  • Nik 1413 posts 6212 karma points MVP 3x c-trib
    Jan 27, 2016 @ 10:14
    Nik
    0

    Hi Sean,

    Why don't you create one redirect page that effectively uses a lookup to perform the redirect.

    You could base this on the parameter being passed in as part of the URL, then you just need to maintain a master list of Shortened -> Long Urls.

    You could do this in a controller, so there isn't a page but simply a controller level redirect.

    Nik

  • Sean Dooley 273 posts 490 karma points
    Jan 27, 2016 @ 12:51
    Sean Dooley
    0

    Hi Nik

    I'm looking to implement this in a controller and trying to find an example of how best to do this.

  • 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